I am trying to find a way to have a push button that closes my iOS app and immediately opens another iOS app on the phone. The point is to quickly close off the app. If that can’t be done easily, is there some way to go from the screen where the app resides back to the home screen?
Thanks for any ideas as to how to proceed
There is no Quit function in iOS.
You can open another app if that app has registered for a custom URL scheme.
showurl("maps://") //Will open Apple Maps
Why do you want to close your app?
You app will be rejected if it has a to quit.
You can intentionally force a crash, but that is kinda frowned on too. Especially by App Store reviewers.
In general, this is not done in iOS, and provided you do not have background processes (such as navigation or media playback) happening, iOS is quite good and not consuming resources or battery power while the app is dormant.
Bonjour Jeremie,
comment ça va?
I am. writing an app that informs people about divorce and separation. If an abusive parther sees someone using it, it may cause conflict.
I thought if they could call another app, and quickly close mine, it might be good.
Philip,
There is, as far as I know, no way to do this easily. Having said that, Apple is reasonably concerned with safety. I suggest you contact them. They have have a suggestion.
Could you not just have a dummy layout that you can quickly switch to? Like a button or swipe and it brings up a screen that looks like a browser with an innocuous website loaded ?
Once accessed it cannot be switched back to the other screen without closing the app.
Something like that perhaps?
Thanks Bob, Mark
I have a button that calls the maps app as suggetsed. by Jeremie.
The next step would be to enable another innocuous app and register it for a custom URL scheme so that it could be called. But that adds addition complications. When I get time, I will explore that.