I am programming an iPhone app, and I need to force it to exit due to certain user actions. After cleaning up memory the app allocated, what’s the appropriate method to call to terminate the application?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have you tried
exit(0)?Alternatively,
[[NSThread mainThread] exit], although I have not tried that it seems like the more appropriate solution.