Skip to content

Commit a6f1307

Browse files
author
Ali Abdelfattah
authored
Merge pull request #97 from Instabug/fix/ui-thread-call
Invoke UIApplication method on the UI thread
2 parents c0de51b + 20563bb commit a6f1307

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sampleApp/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ - (void)webViewDidFinishLoad:(UIWebView*)theWebView
6262
/*
6363
* Hide the Top Activity THROBBER in the Battery Bar
6464
*/
65-
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
65+
dispatch_async(dispatch_get_main_queue(), ^{
66+
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
67+
});
6668

6769
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.enginePlugin.webView]];
6870
}

0 commit comments

Comments
 (0)