How can I know whether app is terminated by user?
(Double-clicking Home button and press red minus ‘-‘ button)
I need sample or pseudo code…
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.
Sometimes you do get the
UIApplicationWillTerminateNotification(you can also implement theapplicationWillTerminate:method in your app delegate), but it’s not guaranteed that you do get any notification at all in this case. So don’t rely on it.You won’t receive the notification if your app is “suspended”, that is it is in background but not running. In the suspended case you simply get killed with the non-catchable
SIGKILL. Same for when you get killed due to out-of-memory.From the documentation for
applicationWillTerminate:(emphasis mine):