Arun jalota
Arun jalota

Reputation: 252

Asking user to restart app via exit(0) in iphone?

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?

Upvotes: 0

Views: 636

Answers (1)

nneonneo
nneonneo

Reputation: 179422

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).

Upvotes: 5

Related Questions