[
https://issues.apache.org/jira/browse/CB-11997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706321#comment-15706321
]
ASF GitHub Bot commented on CB-11997:
-------------------------------------
Github user shazron commented on a diff in the pull request:
https://github.com/apache/cordova-plugin-wkwebview-engine/pull/23#discussion_r90091089
--- Diff: src/ios/CDVWKWebViewEngine.m ---
@@ -123,6 +123,32 @@ - (void)pluginInitialize
name:UIApplicationWillEnterForegroundNotification
object:nil];
NSLog(@"Using WKWebView");
+
+ [self addURLObserver];
+}
+
+- (void)onReset {
+ [self addURLObserver];
+}
+
+static void * KVOContext = &KVOContext;
+
+- (void)addURLObserver {
+ if(![[NSProcessInfo processInfo]
isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){.majorVersion = 9,
.minorVersion = 0, .patchVersion = 0 }]){
--- End diff --
To make it simpler, you can use `IsAtLeastiOSVersion(@"9.0")` (from
CDVAvailability.h)
I'm not sure how this whole patch would work for iOS 8, because of this
note: https://github.com/apache/cordova-plugin-wkwebview-engine#notes
Is this for a "using a local webserver" context?
> The webView should reload when a crash occurs (iOS 8)
> -----------------------------------------------------
>
> Key: CB-11997
> URL: https://issues.apache.org/jira/browse/CB-11997
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin WKWebViewEngine
> Reporter: Connor Pearson
> Assignee: Shazron Abdullah
>
> When the WKProcess dies, the content is blanked out and the URL becomes nil.
> This results in a "white screen" that can only be resolved by restarting the
> app. See this for more info: https://bugs.webkit.org/show_bug.cgi?id=148685
> With the iOS9 API, it is now possible to detect when the WKProcess dies. On
> iOS 8, we can listen for changes on URL of the WKWebView to be notified when
> it crashes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]