cordova-plugin-wkwebview-engine icon indicating copy to clipboard operation
cordova-plugin-wkwebview-engine copied to clipboard

WKWebview freezes at splashscreen in iOS 9.3.2

Open menshinobi opened this issue 8 years ago • 4 comments

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?

menshinobi avatar Oct 27 '16 20:10 menshinobi

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://* ...

peterpeterparker avatar Nov 06 '16 18:11 peterpeterparker

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.

ErkoKnoll avatar Jan 30 '17 12:01 ErkoKnoll

Check you have included all tags in config.xml as per readme.md. I had to do that for one of my projects.

michaelpeterlee avatar Mar 02 '17 20:03 michaelpeterlee

try this:

  1. ionic cordova plugin rm cordova-plugin-wkwebview-engine
  2. ionic cordova plugin add https://github.com/ionic-team/cordova-plugin-wkwebview-engine.git --save
  3. 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.

epetre avatar Aug 09 '17 00:08 epetre