Skip to content

Commit

Permalink
UIWebView call loadRequest multiple times lead to deadlock in iOS12
Browse files Browse the repository at this point in the history
Detail Explanation
  *  Forces iOS 12 to fire callback in webViewDidFinish to disable
  the splash screen and load the webview for the app.
  *  Fix ported from: apache#450
  • Loading branch information
jeff2013 committed Mar 6, 2019
1 parent 73e5df6 commit 2934d08
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,13 @@ - (void)webViewDidFinishLoad:(UIWebView*)webView
break;

case STATE_WAITING_FOR_LOAD_FINISH:
if (_loadCount == 1) {
if (@available(iOS 12.0, *)){
fireCallback = YES;
_state = STATE_IDLE;
} else {
if (_loadCount == 1) {
fireCallback = YES;
_state = STATE_IDLE;
}
}
_loadCount -= 1;
break;
Expand Down

0 comments on commit 2934d08

Please sign in to comment.