Start a new topic

How to load offline content in iOS8 (WKWebView can?t load file:// urls)

How to load offline content in iOS8 (WKWebView can?t load file:// urls)

1 person has this problem

Hi everybody,

I am building an phonegap ios8 app in which ar content can be downloaded to device ("offline mode").
Loading the ar content online works just fine, but when I try to load ar content stored locally on device I end up just seeing the camera view without any html content shown.
In Android (even Lollipop) the same code is working.
So I assume is this related to a major bug in ios8 : the new WKWebView can't load file:// urls ( and the wikitude phonegap plugin is using it in its ios implementation?
Is there any solution or workaround yet for this issue?

I updated my test device to latest ios 8.2 beta 3 and it has not been fixed yet, so it probably will take some this until Apple will officially fix the issue...

- Many thanks in advance!

Some details about my test setup:
phonegap version is 4.1.2-0.22.10
ios version is 8.2 beta 3 on an iphone 5s
wikitude plugin version should be 4.0.3? (cordova plugin add
Hi Pascal,
The Wikitude SDK does not use the iOS SDK WKWebView because it has to many bugs. 

Your problem might be related to relative/absolute paths. Please make sure that your resource paths are correct. You can also activate the Wikitude SDK logging console in JS using AR.logger.activateDebugMode(). A orange triangle appears in the lower right corner of the screen - tap on it and you see a list of logs from the Wikitude SDK.

Best regards
Hi Andreas,

thanks for your reply, good to know that your are not using the WKWebView.

Although it is strange that the code is working on Android. But this might be related to some other cordova/phonegap ios quirk.

I will check the Wikitude SDK logs. As soon as I identified the problem and come up with a solution, I will post it here, so this might help other developers.

oh thanks for your sharing this
Was this ever resolved? I ran into this problem yesterday and my only resolution was to back out WKWebView.

Hi @all,

file:// urls are a know issue of iOS 8 but was resolved with iOS 9. We tested WKWebView with our latest Cordova plugin release and couldn't notice any issue.

Please create a new thread if you encounter any new issues with WKWebView in combination with the Wikitude SDK.

Best regards,


Login or Signup to post a comment