Is there a way to programmatically exit & kill an iOS app which is running in "single app mode" everyday at a specific time?
Also is there a way to start / launch the same app automatically at another specific time?
Basically, I want the exit/kill the app at the close of business hours everyday and automatically start/launch the app every morning.
Is this possible with iOS programming or even with the help of any MDM tools? if yes, what are the steps / details to achieve the same?
exit(0)
is the code to kill your app programatically. How you do it is at a particular time or event is left upto you. You can send a push notification and kill the app on the push notification or a local notification which is fired at a particular time.
While as for starting up an app it is not possible unless it be for VOiP apps which are brought into foreground directly in case of an incoming call.
Hope this helps and clear out your doubts.
Happy Coding!
Please refer these SO Post 1, SO Post 2, Restarting App.
But using exit(0) would lead to app rejection on AppStore.