userInfo is empty in continueUserActivity from Siri Shortcut

237 views Asked by At

I've followed this excellent tutorial to implement donating Siri Shortcuts from my app:

https://www.raywenderlich.com/6462-siri-shortcuts-tutorial-in-ios-12

but I am unable to receive any custom data set on my NSUserActivity's userInfo dictionary.

Using the sample app in the tutorial, I added:

    activity.userInfo = ["key": "value"]
    activity.requiredUserInfoKeys = ["key"]

to Article.newArticleShortcut(), but userActivity.userInfo is an empty dictionary in the AppDelegate's continueUserActivity.

I tried the suggestions mentioned here (which are solving the same problem with Handoff), but they didn't help: https://developer.apple.com/forums/thread/9690

Has anyone been able to get this to work? I'm not sure what else I'm missing.

0

There are 0 answers