cordova-plugin-safariviewcontroller
cordova-plugin-safariviewcontroller copied to clipboard
Hide not working
Calling SafariViewController Hide method doesn't close the SafariViewController sometimes, i.e Sometimes the browser is closed, but mostly on cold start the browser doesn't get closed. Have observed this issue on iOS 10.
Also we always get success block for hide in both the use cases
We are having the same issue, but never got the SafariViewController to close on iOS. Any idea on why that may be @EddyVerbruggen?
I can confirm that this is happening to me as well. The plugin works as expected within the iOS simulator, but it does not work on a device.
One more update @EddyVerbruggen @FdezRomero, I was able to get this plugin to work for me when the iPad is in the portrait orientation, but not the landscape orientation.
I am also experiencing the same issue - using Ionic. Works on the simulator but on an actual device is stuck on a blank white page with the title "Website name". My mobile app hits a Rails server which handles the response from the oAuth provider and opens the app with a deep link.

Clicking "Done" completes the flow as expected.
We are experiencing the same issue...
The hide method doesn't work for me as well in iOS. Handle open url callback is called, runs my auth code but never closes the browser. EDIT: I just fixed my issue and it was a bad configuration of different url schemes. Now the plugin works as expected and hide gets called. Sorry for confusion.
I can't reproduce this. Could you guys do the simplest test possible, namely connecting to an iOS device, and paste: SafariViewController.show({url: 'https://google.com'}, console.warn, console.error); in the console. Then SafariViewController.hide();. Does it hide?
+1, seems to be related only to cold starts
Hello @larssn, I tried what you asked on my device and it's not hiding after calling SafariViewController.hide();
I finally had it working by avoiding the plugin
availabilitycheck, and correctly calling thehide()Ionic wrapper of the plugin (it returns aPromise) ...
Correcting what I said, still not working ^^
Also encountering this on iOS. Cordova v8.1.2.