cordova-plugin-safariviewcontroller icon indicating copy to clipboard operation
cordova-plugin-safariviewcontroller copied to clipboard

Hide not working

Open sjumble opened this issue 8 years ago • 11 comments

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

sjumble avatar Mar 31 '17 14:03 sjumble

We are having the same issue, but never got the SafariViewController to close on iOS. Any idea on why that may be @EddyVerbruggen?

FdezRomero avatar May 30 '17 18:05 FdezRomero

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.

dniccum avatar Aug 01 '17 20:08 dniccum

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.

dniccum avatar Aug 01 '17 20:08 dniccum

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.

img_9c34b9caba53-1

Clicking "Done" completes the flow as expected.

pherris avatar Dec 11 '17 21:12 pherris

We are experiencing the same issue...

Goosaroo avatar Jan 19 '18 11:01 Goosaroo

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.

dcxn avatar Jan 22 '18 10:01 dcxn

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?

larssn avatar Mar 15 '18 18:03 larssn

+1, seems to be related only to cold starts

MattiaPrimavera avatar Jul 26 '18 23:07 MattiaPrimavera

Hello @larssn, I tried what you asked on my device and it's not hiding after calling SafariViewController.hide();

MattiaPrimavera avatar Jul 28 '18 02:07 MattiaPrimavera

I finally had it working by avoiding the plugin availability check, and correctly calling the hide() Ionic wrapper of the plugin (it returns a Promise) ...

Correcting what I said, still not working ^^

MattiaPrimavera avatar Jul 30 '18 00:07 MattiaPrimavera

Also encountering this on iOS. Cordova v8.1.2.

tatethurston avatar Aug 28 '19 02:08 tatethurston