As @rmaddy says, the correct method to use after starting the application is applicationWillEnterForeground: from your application delegate. This method will be called when the user jumps back, but NOT in other circumstances that you do not need to respond to (for example, the user receives a text message and rejects it).
However, from my testing, applicationWillEnterForeground: not called when the application starts from a cold; you must catch this in applicationDidFinishLaunchingWithOptions:
So basically, your application delegate should include this code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self checkForURL]; ... } - (void)applicationWillEnterForeground:(UIApplication *)application { [self checkForURL]; ... } - (void)checkForURL{
Hope this helps.
source share