3

I understand didFinishLaunchingWithOptions returns UIApplicationLaunchOptionsURLKey when launching my app from another application.

I also understand that openURL:sourceApplication returns a URL passed when calling my app from another application, doing so in both cases of launching the app and returning from background.

Since openURL:sourceApplication seems to always be called, it seems most logical to place all logic there - It seems strange that didFinishLaunchingWithOptions would contain the UIApplicationLaunchOptionsURLKey at all to begin with?

My question is: In which method should I place the functionality of handling the URL?

What is the best practice?

cohen72
  • 2,830
  • 29
  • 44
  • where you even able to find the UIApplicationLaunchOptionsURLKey when you called the custom url from safari? – locoboy Jul 28 '15 at 06:53

1 Answers1

0

The documentation says you should add the functionality of handling to application:willFinishLaunchingWithOptions: or application:didFinishLaunchingWithOptions:.

Alexey Golikov
  • 652
  • 8
  • 19