You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/31 08:26:21 UTC
[GitHub] [cordova-plugin-inappbrowser] Joe-song-77 commented on issue #603: Inappbrowser opened in iOS goes missing after app open back from background
Joe-song-77 commented on issue #603:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/603#issuecomment-667001853
I also face the same issue with iOS Cordova 6.1.0 and InAppBrowser 4.0.0. Yet, our project works fine with iOS Cordova 5.1.1 and InAppBrowser 3.2.0. Not sure what's the root cause. But, I just make a workaround for this issue.
Declare the below method in CDVWKInAppBrowser:
**- (void)onAppWillEnterForeground {
if (self.inAppBrowserViewController != nil) {
NSLog(@"CDVWKInAppBrowser onAppWillEnterForeground to make InAppBrowser as key and visible");
dispatch_async(dispatch_get_main_queue(), ^{
**[self->tmpWindow makeKeyAndVisible];**
});
}
}**
And, register the observer for event 'UIApplicationWillEnterForegroundNotification' in 'pluginInitialize' method of CDVWKInAppBrowser:
**[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillEnterForeground)
name:UIApplicationWillEnterForegroundNotification object:nil];**
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org