Open hobzcalvin opened 7 years ago
I must admit that this seems related to our use of the in-app browser, which if closed too soon before our SVC calls messes things up. So this may not be a widely-experienced bug. Still, I'm at a loss: the ObjC seems to think everything's fine, until it's not.
@hobzcalvin I am facing a similar issue as you (in iOS). When I reopen the SafariViewController that was just closed before, I get a blank page. I tried modifying the plugin to fire the pluginresult in the "completion" callback of "dismissViewControllerAnimated" but to no avail. Can you elaborate on how you fixed the issue?
We "fixed" it by waiting 500ms between closing one browser and opening the other :-(
I initially tried with timeout as well and it "worked". I turned off the animation and it seems to be working now without the timeout :). Thanks @hobzcalvin !
I have a call to
SafariViewController.show({hidden:false, animated:true, url:"https://facebook.com")
wrapped in a call toSafariViewController.isAvailable()
, as the docs suggest. The SVC slides into view as expected, but it is completely blank and unusable. The "opened" event is fired (since it's just at the bottom ofshow
) but "loaded" is not. However, if I put up awindow.alert()
orsetTimeout(>0)
before callingshow()
, everything works as expected! I've added lots ofNSLog()
s toSafariViewController.m
and everything looks fine: it isn't hidden, and we get to the bottom of the ObjCshow
method without issue. The delegate methods are never called.This is on my iPhone 5S running iOS 9.3.5. Cordova 5.3.3, iOS engine 4.3.1. Plugins:
com.shoety.cordova.plugin.inappbrowserxwalk 0.3.3 "InAppBrowser Crosswalk" cordova-plugin-app-event 1.2.0 "Application Events" cordova-plugin-crosswalk-webview 1.5.0 "Crosswalk WebView Engine" cordova-plugin-customurlscheme 4.1.5 "Custom URL scheme" cordova-plugin-device 1.1.2 "Device" cordova-plugin-dialogs 1.2.1 "Notification" cordova-plugin-inappbrowser 1.3.0 "InAppBrowser" cordova-plugin-restrict-keyboard 1.0 "Restrict Keyboard" cordova-plugin-safariviewcontroller 1.4.6 "SafariViewController" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-statusbar 2.1.3 "StatusBar" cordova-plugin-whitelist 1.2.2 "Whitelist" cordova-universal-links-plugin 1.1.2 "Universal Links Plugin" de.appplant.cordova.plugin.local-notification 0.8.5-dev "LocalNotification" io.hpd.cordova.gimbal2 1.0.1 "Gimbal2" phonegap-plugin-push 1.5.3 "PushPlugin"