-6

i need to exit application without using home button.I call to exit(0) method is working. it is proper way to exit application or any issues?.if any another way to exit application? . please help me..

2

3 Answers 3

1

any another way to exit application?

Add Application does not run in background key and set its value YES in your application plist file. When your user press home button then app will be closed.

0

You can use abort(); or raise an NSException which will cause the application to crash.

It is not the recommended behaviour to exit the application programatically, you should be displaying an alert to the user stating the reason as to why your application needs to quit, and telling the user how he can quit your app so that it doesn't look like your app is buggy.

0
iOS Human Interface Guidelines says Don't Quit Programmatically. we have seen many of apps that had calls to exit(0) previously.
    Apple provided the different stages to exit the app. For that they provided different methods. So by exit() code its not proper to exit the app since the app will get rejected by Apple.
    you can refer this Apple Doc at http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/UEBestPractices/UEBestPractices.html#//apple_ref/doc/uid/TP40006556-CH20-SW27

Not the answer you're looking for? Browse other questions tagged or ask your own question.