[ 
https://issues.apache.org/jira/browse/CB-9888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320272#comment-15320272
 ] 

craig mcmillan commented on CB-9888:
------------------------------------

so the `webViewContentProcessDidTerminate` delegate function on 
`CDVWKWebViewEngine` already does something sensible, i.e. `[wkWebView reload]` 
... i was still suffering from occasional White Screen Of Death though, 
unpredictably but invariably after some hours of the app being in the 
background and therefore pretty much impossible to catch in a debugger

making the assumption that the problem was that in some cases the 
`webViewContentProcessDidTerminate` delegate function doesn't get called when 
an app is resumed i implemented the following :

https://github.com/employeerepublic/cordova-ios/commits/4.1.1-branch
https://github.com/employeerepublic/cordova-plugin-wkwebview-engine/commits/1.0.3-branch

which adds a `- (BOOL)reloadIfRequired` method to `CDVWebViewEngineProtocol` 
and calls it from `CDVViewController.onAppWillEnterForeground`. in the 
`CDVWKWebViewEngine` the implementation uses the title tag hack outlined above 
to determine if the content process is alive, and if not does the `[wkWebView 
reload]` 

none of our users have had a WSOD incident since i implemented this patch 4 
days ago, though given the nature of the problem "absence of evidence is not 
evidence of absence", but i would have expected a couple of incidences in that 
time prior to my patch

> WKWebView on iOS9 on iPhone 5 (32-bit phone) - occasionally resets view
> -----------------------------------------------------------------------
>
>                 Key: CB-9888
>                 URL: https://issues.apache.org/jira/browse/CB-9888
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin WKWebViewEngine
>    Affects Versions: 4.0.0
>         Environment: iphone 5, ios9.1
>            Reporter: Jan Pittner
>
>  Occasionally the entire web view is cleared. White screen. Plugins and other 
> components remain unaffected. Observed when playing background audio (via 
> CDVSound), going to background, and running other apps. Audio continues 
> uninterrupted, but bringing the app to foreground reveals white screen.
> It appears to be related to an issue with the XPC connection being lost 
> between the app and the wkwebview (log in XCode mentioned the XPC connection 
> being interrupted). (see also: 
> http://stackoverflow.com/questions/25854143/wkwebview-intermittent-blank-screen-issue
>  )
> The plugin should detect if the WKWebView has reset and reload the app. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to