ios - WKWebView does not load NSURLs created with fileURLWithPath:relativeToURL: -


i noticed wkwebview not load (via loadfileurl:allowingreadaccesstourl:) nsurl created fileurlwithpath:relativetourl:.

i created github repo showing behavior: https://github.com/davidkraus/wkwebviewnsurl

as workaround can pass absolute string of url new nsurl.

var theurl = nsurl(fileurlwithpath: "www/index.html", relativetourl: folder) // create new nsurl theurl = nsurl(string: theurl.absolutestring)! webview.loadfileurl(theurl, allowingreadaccesstourl: theurl) 

Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -