iphoneipadbackground-processios-3.x

Unable to get Force Quit event in iOS when background process is allowed, How to do?


After iOS 3.2, Apple allowed us to keep running our application in background mode. Using the same concept, in my application I have downloading functionality implemented which runs over in background mode.

The problem is that whenever I force quit my app manually, (Double tap on home button > long tap on app icon > tap on cross button of app) as per Apple specifications. I am not able to track that event in code, hence I am unable to track my downloading data.

Because of that, my data is being lost. So how to track this and track/save data before it gets force quitted.

Reference: AppDelegate Protocol


Solution

  • As far as I know, there is no way to handle that event, since it kills the whole process immediately.

    You will need to save your data periodically or just leave it like it is. User killing apps, should be aware of that he is killing apps.