continueUserActivity not called from search closed app

Niko,

first of all: there's a way to start your app from Xcode and not opening it immediately: open your scheme properties, go to the "run" section, and under "info", there's a switch that will help you to debug what's happening:

"Wait for executable to be launched".

If you activate this switch, you can launch the app from Xcode, Xcode will wait until the app is opened from search and then it will attach the debugger to it.

Hope that helps!

Ivan


If you are using the Facebook SDK, and in didfinishlaunching your are returning FBSDK, instead of plain text, and returning true at the end, it can cause problems hitting continueuseractivity.

After searching a lot, and trying different ways, I just had to return true and comment this:

FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)


In the new Swift 5 there is a new new file called SceneDelegate.swift. Use the method scene(_ scene: UIScene, continue userActivity: NSUserActivity)