cordova-plugin-wkwebview-engine
cordova-plugin-wkwebview-engine copied to clipboard
WKWebview freezes at splashscreen in iOS 9.3.2
I have WKWebview ver 1.1.1, Cordova iOS 4.1.1. My app totally runs fine in iOS 10 but in iOS 9.3.2, it stucks at splashscreen.
It looks like the deviceready event does not fire. I got this error message from Web inspector
Failed to load resource: unsupported URL gap://ready
Looking up in Google does not point me to anywhere.
Most people have successfully resolved this issue by upgrading their Cordova iOS version but mine is already 4.1.1.
My ATS config
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
My config.xml values of access and allow navigation is
<access origin="*" /> <allow-navigation href="*" />
Anyone has this bug?
Maybe a dumb idea, have you try allowing gap://* in your CSP?
Something like following in your index.html
<meta http-equiv="Content-Security-Policy" content="default-src data: gap://* file://* ...
I discovered that the same thing happened for me on iOS 10 but because I was hiding splash screen manually and had set AutoHideSplashScreen to false on config.xml. Currently you need to set it to true otherwise the app hangs on startup.
Check you have included all tags in config.xml as per readme.md. I had to do that for one of my projects.
try this:
-
ionic cordova plugin rm cordova-plugin-wkwebview-engine
-
ionic cordova plugin add https://github.com/ionic-team/cordova-plugin-wkwebview-engine.git --save
- Run
If you are running the cordova version instead of ionic-team one, that kind of funkiness happens so maybe it's what is wrong with your setup.