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..
Asked
Active
Viewed 3,667 times
-6
-
1http://stackoverflow.com/questions/8003519/close-app-when-internet-is-not-available – Ankur Feb 27 '13 at 11:29
-
please check the link below to get solution for your problem http://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application – Rajesh Feb 27 '13 at 11:41
3 Answers
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.

Maulik
- 19,348
- 14
- 82
- 137
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.

max_
- 24,076
- 39
- 122
- 211
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

Rahul
- 134
- 6