SFSafariViewController url scheme issue

As of iOS 10 the SFSafariViewController is no longer working the way it did in iOS 9 with url schemes and getting back to the application after the web page is done.


In iOS 9 this worked.

  1. Launch url in SFSafariViewController from iOS app
  2. Have a button on the web page shown in safari that will set the window.location.href to the url scheme of the app that launched the SFSafariViewController
  3. applicationDidBecomeActive was called for the url scheme (same app as in step #1) and SFSafariViewController could be closed


In iOS 10 the step #3 no longer happens.


Questions related to iOS 10.

What is the proper way to get back to the application that created the SFSafariViewController? Without using Done button.

Can you close the SFSafariViewController from the web page? JS window.close() doesn't work.

What is called in the app when calling the url scheme from SFSafariViewController? It is no longer applicationDidBecomeActive.

Determined that with iOS 10 applicationDidBecomeActive is no longer called when using a url scheme in SFSafariViewController (it was with iOS 9). Instead openURL needed to be used to get back into the application after calling the url scheme from SFSafariViewController.

Can you share more about what you mean by "openURL needed to be used to get back into the application"? I'm experiencing this problem as well.

SFSafariViewController url scheme issue
 
 
Q