Search code examples
iphoneexituiactionsheet

suspend the application programmatically if no internet connection iPhone?


I have a problem which describes here app crashes after checking network reachability in iphone? this problem occurs when app launches at first time, and not yet solved! next solution I found is to close the app if no internet connection found at the first time of launching and tell the user to reopen.

can I use exit(0) if the action sheet ok button pressed, someone says that we can use exit(0); if we have a reason to use that.. any other solution?


Solution

  • Check your code and try to solve crashing problem because Quitting your application programmatically is a violation of the iOS Human Interface Guidelines, which usually doesn't well for getting through the review process: