I want user to start new session at some point of time in my app, so can i ask user to restart app now using popup and if he clicked 'yes' .i exit the app using exit(0). is it valid under apple human guidelines?
Asked
Active
Viewed 579 times
1 Answers
5
Absolutely not. From the Human Interface Guidelines:
Don’t Quit Programmatically
Never quit an iOS application programmatically because people tend to interpret this as a crash. However, if external circumstances prevent your application from functioning as intended, you need to tell your users about the situation and explain what they can do about it.
If you want to reset the session, you should have a way of resetting your state from within the app and returning to its first screen (if applicable).
-
1Also why should you nee restart the app to start a new session. Could you not just stop the old session and start a new one? – rckoenes Oct 10 '12 at 06:59
-
I understand why it might be expedient from a development perspective not to have to deal with resetting the app/session state. But, of course, that is the right thing to do. – nneonneo Oct 10 '12 at 07:00
-
1Excatly, don't try this I got my application rejected due to same reason two years back. Please find the reasobn sent by Apple - ""Always Be Prepared to Stop iOS applications stop when people press the Home button to open a different application or use a device feature, such as the phone. In particular, people don’t tap an application close button or select Quit from a menu. It would be appropriate to remove any mechanisms for quitting your app." – Sahil Arora Apr 22 '13 at 12:18