In iOS, we all know that there is an AppDelegate applicationWillTerminate method, and it is called when my application is closed by the user, when it is running (that is, not in the background). But I want to do something (for example, save data) when my application is completed (closed by the user or killed by the OS), when it runs in the background.
PS: my application can run in the background.
Do you have any solutions? thanks.
source share