I found that there is something that I did not see in any documentation. Perhaps this is just for objective-C, but it fixes the problem. The solution is to assign your NSUserActivity to the view controller’s built-in userActivity property. The view controller automatically invokes becomeCurrent and resignCurrent for us. At first I tried doing this manually but that does not seem to work. The Apple documentation seems to suggest that you should manually invoke [activity becomeCurrent]. But the sample code that @edford pointed to did not manually invoke [activity becomeCurrent]. This led me to find an objective C implementation (I can't link to the article, but search for Integrating iOS 12 Siri Shortcuts using Objective-C - PQVST) of Siri Shortcuts that noted that it is important to use the view controller's built-in userActivity property.
Topic:
App & System Services
SubTopic:
General
Tags: