I am using auto crash recovery in the WKWebViewEngine plugin and I have noticed that sometimes when the page enters the foreground and it reloads I end up with a blank screen.
Refreshing the page again does not make the DOM appear and if I navigate to another page I still have a blank screen.
I have managed to easily reproduce the problem with a clean project and a slight modification to make the app refresh every time it's brought to foreground. My "test" only happens on my iPhone 6S Plus. I have tried it on an iPhone 5 & iPad mini 2 but the bug never seems to happen.
Here are the steps:
- cordova create hello com.example.hello HelloWorld
- cordova platform add ios --save
- cordova plugin add cordova-plugin-wkwebview-engine
- In CDVWKebViewEngine.m => method (BOOL)shouldReloadWebView) => line 185 => Change it to return YES; (so it will awlays reload!)
- Run the app on the device (remember to use an iPhone 6S Plus, though perhaps it would still be a problem on a similar device 6/6s/7)
- Repeatedly send the app to the background/foreground by pressing the home button / app icon
- It usually will occur in 1-5 "reloads" but sometimes it can be up to ~25
Needless to say this is a critical error that is preventing me releasing my app.