How to switch back to previous app on iOS?

We need the ability for our iOS app to be started from another app (e.g. Safari, via URL), then when the user has finished with it, for it to return to the previous app.

E.g. if the launching app was chrome, we can do it by issuing an openUrl of just "googlechrome://", but if it's safari just "http://" doesn't work.

At this stage we really only need to support switching back to popular web browsers, but surely there's a more general solution?

Replies

There’s no general API-level solution to this problem. OTOH, iOS 9 typically displays a “Back to ***” button on the top left of the target app’s screen after a URL transition, so it’s easy for the user to do this.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

My app requires the user to scan an NFC tag for authentication.

I provide links with login information on a website with a registered custom URL Scheme.
My app should open, let the user scan their NFC tag and send the user back to the previous opened app.
Not possible to make it automatic without making the user click the "Back to ***" button?