[
https://issues.apache.org/jira/browse/CB-9888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15328393#comment-15328393
]
ASF GitHub Bot commented on CB-9888:
------------------------------------
GitHub user mccraigmccraig opened a pull request:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/11
CB-9888: (iOS) check & reload WKWebView
PR as discussed on JIRA @shazron
### Platforms affected
iOS 9
### What does this PR do?
Checks whether the WKWebView content process has died when the app enters
the foreground. If it has, then reloads the WKWebView
### What testing has been done on this change?
Tested on iOS9.3 emulator and iPhone 6 / 9.3.1
### Checklist
- [x] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and
submitted to [email protected].
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html)
in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform
affected.
- [x] Added automated test coverage as appropriate for this change.
When an app is entering the foreground,
the WKWebView content process sometimes dies without
calling the webViewContentProcessDidTerminate delegate function.
This PR checks whether the content process has died, by
examining the title property of the WKWebView, which is nil
when the process has died.
If the process has died the WKWebView is reloaded,
which avoids the White Screen Of Death problem described
in CB-9888.
You can merge this pull request into a Git repository by running:
$ git pull
https://github.com/employeerepublic/cordova-plugin-wkwebview-engine
1.0.x-reload-on-resume-CB9888-3
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/11.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #11
----
commit 0966cd31b40ca1dd2f16f0d98f02919b8eb47e69
Author: mccraig mccraig of the clan mccraig <[email protected]>
Date: 2016-06-13T21:41:05Z
CB-9888: (iOS) check & reload WKWebView
When an app is entering the foreground,
the WKWebView content process sometimes dies without
calling the webViewContentProcessDidTerminate delegate function.
This PR checks whether the content process has died, by
examining the title property of the WKWebView, which is nil
when the process has died.
If the process has died the WKWebView is reloaded,
which avoids the White Screen Of Death problem described
in CB-9888.
----
> 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
> Assignee: Shazron Abdullah
>
> 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]