Practically click the "Return to [app]" button in Safari iOS9

Our team is creating an iOS application that contacts Safari to handle the flow of charitable donations. In iOS 8, we can return the user back to the application by setting document.location to the application’s custom URL scheme (for example, myappscheme: // donation / success), and everything works fine for the user.

In iOS 9, Apple seems to have tightened its security model to display a pop-up dialog when using Safari’s custom URL schemes - this allows the user to click Cancel rather than link [back] to the application.

My question is that iOS 9 now has a “<Back to [app]” button in the Safari header - is there a way to “click” this link through JavaScript, instead of resorting to a custom scheme or Apple’s new universal link mechanism?

It’s advisable to click “Back to [application]”, since Safari moves to the right (the opposite of how Safari now slides to the right), rather than “reopening” our application, for example after clicking “OK” in a pop-up dialog box. It would also prevent iOS from placing the "Back to Safari" link in the upper left corner of our application, which happens when our application opens through Universal Link or Custom Schema.

+4
source share
1

, , Apple , . , . - SDK, .

iOS 9 , - Safari View Controller (SFSafariViewController) . Safari ( , cookie ..), ( Safari, "" ).

+1

Source: https://habr.com/ru/post/1607011/


All Articles