I'm computing a NSUserActivity for when I view a specific screen in my app. (Doesn't matter what, imagine a Location)
I set a lot of information about this activity/location using the contentAttributeSet.
When I visit this screen over and over, I set the viewController's userActivity property to this derived activity, and also call becomeCurrent()
on it.
Eventually Siri will suggest that shortcut in Spotlight. As expected and desired. I tap on that, it launches my app and calls:
func application( _ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool
however, the .contentAttributeSet
property will be nil.
Why? Have I not understood something here? I guess any data I need to access later should be in the userInfo dictionary? That works (as long as I don't set webpageURL)