Reputation: 1911
I know my app can be killed while in background by the system.
Is it also possible to have its data structures released but the app not being killed?
-(void)applicationWillEnterForeground:
.-(BOOL)application:didFinishLaunchingWithOptions:
Should I also restore local data in -(void)applicationWillEnterForeground:
?
If the app is killed it will come back through -(BOOL)application:didFinishLaunchingWithOptions:
so my data will be restored, but if it is not killed but its data structures released it will came back through - (void)applicationWillEnterForeground:
so no data will be restored.
Upvotes: 0
Views: 49
Reputation: 46718
If your app is killed and then relaunched your -application: didFinishLaunchingWithOptions:
will be called.
If your app is backgrounded and then resumed -applicationWillEnterForeground:
will be called.
You should not need to restore data state when -applicationWillEnterForeground:
is called.
Upvotes: 1