Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Loading error after code-push update using WKWebView plugin #163

Closed
seriouscircus opened this issue Sep 14, 2016 · 2 comments
Closed

Loading error after code-push update using WKWebView plugin #163

seriouscircus opened this issue Sep 14, 2016 · 2 comments

Comments

@seriouscircus
Copy link

In my iOS app I want to make use of the better performance of the WKWebView. I am using the official cordova-plugin-wkwebview-engine plugin. But after a new code-push update package has been downloaded the restart mechanism can't open the new index.html file. It seems that the app has not the permission to read files from the new package folder.

the location of the current index.html file is

file:///var/mobile/Containers/Data/Application/F1C...52C/Library/NoCloud/codepush/deploy/versions/523...571/index.html

the location of the new index.html file which can't be loaded is

file:///var/mobile/Containers/Data/Application/F1C...52C/Library/NoCloud/codepush/deploy/versions/123...AF7/index.html

Everything is working again when I completely stop the app and restart it. Then the new index.html file can be served. (Using the UIWebView instead of WKWebView there are no problems replacing the code-push packages.)

Is there a solution for this problem?

I found a discussion about the cordova-hot-code-push plugin which seems to address the same problem: nordnet/cordova-hot-code-push#85
There the issue ("By default, wkwebview doesn't allow to switch to another folder. WK plugin set's readAccessURL to the folder, that is 1 level up to the index.html. ") is resolved by setting the readAccessURL from inside the plugin. Is this is also a possible solution for the cordova-plugin-code-push plugin?

@seriouscircus
Copy link
Author

problem solved by updating all plugins to latest version

@richardhuaaa
Copy link
Contributor

Thank you for the update @seriouscircus!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants