I am trying to get my iPhone app to restart programmatically when the Logout button is pressed.
Has anyone got a code sample to share? I\'ve read that it is possible
I exit during -applicationWillResignActive: if the app is on the start screen and Apple has accepted it for years. To the user it will not look like a crash. Next time the user starts the app from the icon. An additional check that does not quit the app if it was launched today could be useful for the user-experience in some cases.
- (void)applicationWillResignActive:(UIApplication *)application
{
// called if phone-call comes in!
if([gameController isGameFinished])
exit(0);
}