[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-12-07 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-11997:
--

Commit d9d30f2cf91f307b44ecc5efe1763ae7d0b3bdb3 in 
cordova-plugin-wkwebview-engine's branch refs/heads/1.1.x from [~cjpearson]
[ 
https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-wkwebview-engine.git;h=d9d30f2
 ]

CB-11997: Add crash recovery for iOS 8


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-12-07 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-11997:
--

Commit d5591deceba8936b9bfb7a0d04e60504ed12e407 in 
cordova-plugin-wkwebview-engine's branch refs/heads/1.1.x from [~cjpearson]
[ 
https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-wkwebview-engine.git;h=d5591de
 ]

CB-11997: Code review comments

 This closes #23


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-12-05 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-11997:
--

Commit d5591deceba8936b9bfb7a0d04e60504ed12e407 in 
cordova-plugin-wkwebview-engine's branch refs/heads/master from [~cjpearson]
[ 
https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-wkwebview-engine.git;h=d5591de
 ]

CB-11997: Code review comments

 This closes #23


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-12-05 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-11997:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cordova-plugin-wkwebview-engine/pull/23


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-12-05 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-11997:
--

Commit d9d30f2cf91f307b44ecc5efe1763ae7d0b3bdb3 in 
cordova-plugin-wkwebview-engine's branch refs/heads/master from [~cjpearson]
[ 
https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-wkwebview-engine.git;h=d9d30f2
 ]

CB-11997: Add crash recovery for iOS 8


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-12-05 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-11997:
-

Github user shazron commented on the issue:

https://github.com/apache/cordova-plugin-wkwebview-engine/pull/23
  
Note: this passes tests when run locally (the CI has a known issue that it 
fails). Pulling this in now.


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-11-30 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-11997:
-

Github user cjpearson commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-wkwebview-engine/pull/23#discussion_r90223157
  
--- 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 = 
+
+- (void)addURLObserver {
+if(![[NSProcessInfo processInfo] 
isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){.majorVersion = 9, 
.minorVersion = 0, .patchVersion = 0 }]){
--- End diff --

Yeah I was using the local webserver plugin to support iOS 8.


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-11-29 Thread ASF GitHub Bot (JIRA)

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

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_r90092299
  
--- 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 = 
+
+- (void)addURLObserver {
+if(![[NSProcessInfo processInfo] 
isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){.majorVersion = 9, 
.minorVersion = 0, .patchVersion = 0 }]){
+[self.webView addObserver:self forKeyPath:@"URL" options:0 
context:KVOContext];
+}
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object 
change:(NSDictionary *)change context:(void *)context
+{
+if (context == KVOContext) {
+if (object == [self webView] && [keyPath isEqualToString: @"URL"] 
&& [object valueForKeyPath:keyPath] == nil){
+NSLog(@"URL is nil. Reloading WebView");
--- End diff --

Change WebView to WKWebView to give more clarity in the log here.


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-11-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 = 
+
+- (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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11997) The webView should reload when a crash occurs (iOS 8)

2016-10-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-11997:
-

GitHub user cjpearson opened a pull request:

https://github.com/apache/cordova-plugin-wkwebview-engine/pull/23

CB-11997: Add crash recovery for iOS 8



### Platforms affected
iOS

### What does this PR do?
Reloads the WebView when it crashes. This behavior already exists on iOS >= 
9, but has not been added for iOS 8.

### What testing has been done on this change?
I've tried consuming a bunch of memory in javascript to cause a crash. The 
app reloads successfully.

### Checklist
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
- [ ] Added automated test coverage as appropriate for this change.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/cjpearson/cordova-plugin-wkwebview-engine 
master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-wkwebview-engine/pull/23.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 #23


commit d9d30f2cf91f307b44ecc5efe1763ae7d0b3bdb3
Author: Connor Pearson 
Date:   2016-10-11T18:04:37Z

CB-11997: Add crash recovery for iOS 8




> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org