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
Objective-C:
exit(0);
Swift:
exit(0)
I have this on 2 live apps and they haven't been rejected. One of my apps even has this line of code as a feature in the home page of my app. Its located at the top right corner, where tweet button is on Twitter. So don't worry about the Apple rejecting unless it looks like an unexpected crash.