Quote:
Originally Posted by Chris1979
I see...
so it's only in the applicationWillTerminate, applicationWillResignActive and the applicationDidEnterBackground methods that I need to put the code?
|
I believe that technically you shouldn't need to do any state saving at applicationWillResignActive since from that point on you either return to your app and continue as it was, or transition into another app in which case either your app will terminate or move to the background. You should make sure your app is paused at applicationWillResignActive.
Also, a point to remember: do your loading in the right method, which is applicationDidFinishLaunching:withOptions. Some app templates still use the old applicationDidFinishLaunching without the options, and that can lead to problems in some situations. Also remember that if your loading takes a lot of time, do it asynchronously because applicationDidFinishLaunching:withOptions is expected to return in about 5 seconds. After that, the system will kill your app as unresponsive.