The method -(void)applicationWillTerminate:(UIApplication *)application is not calling when the app removed from background. Can any one tell me the reason for this?
The method -(void)applicationWillTerminate:(UIApplication *)application is not calling when the app removed from background. Can
Share
Your application might be in the suspended state. From the “iOS Application Programming Guide” (link1)(link2):
background state are moved to the
suspended state shortly thereafter.”
is not called if your application is
currently suspended.”
suspended, the system removes your
application from memory without any
notice.”
You may want to use
applicationDidEnterBackground:instead. Or you could opt out of background execution entirely, but then your program would just end when a user presses the Home button.