local path loading on web view swift3

I am developing one iOS application in which I want to load the HTML file on UIWebView, my html file path is as like below,file:///var/mobile/Containers/Data/Application/CFBF549E-3BC4-4B9D-A42E-56F152AB8ECC/Documents/ck/index.html/


this file is in iphone internal storage or from iphone simulator internal storage

swift 3


help me please

thank you

You haven’t really said what the problem is here. In general WKWebView is quite capable of loading resources from a local file. To do this, pass the file URL to

-loadFileURL:allowingReadAccessToURL:
.

IMPORTANT This method is new in iOS 9. On iOS 8, the oldest release that supports WKWebView, loading a local HTML file can be a bit tricky, specifically when the file has references to other local files.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
local path loading on web view swift3
 
 
Q