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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -