From Apple docs:
For applications that do not support background execution or are associated with iOS 3.x or earlier, this method is always called when the user exits the application. For applications that support background execution, this method is usually not called when the user exits the application, because the application simply moves to the background in this case. However, this method can be called in situations when the application is running in the background (not paused), and the system should stop it for some reason.
If your application has the ability to use background:
- (void)applicationDidEnterBackground:(UIApplication *)application
source share