How to handle if app is opened from URL in didFinishLaunchingWithOptions method?
You can inspect launchOptions
passed to - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
.
Look for section Launch Options Keys
in reference docs, specifically UIApplicationLaunchOptionsURLKey
If your app has been launch from a URL You will find a
UIApplicationLaunchOptionsURLKey
in the launchOptions
Dictionary of - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
On a related note the handleOpenURL:
method is deprecated, you should use:
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation