Reputation: 3369
I currently have an iPhone application that makes a call to an API to obtain an Access Token.
This function is currently executed in my -applicationDidFinishLaunching method in the AppDelegate.m file.
However, with iOS4.0 and its ability to multitask, does this method get called each time the app is opened?
If not, is there a special delegate method that is called whenever the app is opened?
Upvotes: 1
Views: 1417
Reputation: 12334
If your application is placed in the background, your delegate will receive the applicationDidEnterBackground
message. If it is opened while still in the background, it will receive the applicationWillEnterForeground
message, not the applicationDidFinishLaunching
message.
You can read about the new application lifecycle transitions here.
Upvotes: 6