Siri Shortcut Passes NSUserActivity Object Twice

In my app, when invoking a Shortcut via Siri, the application(_:continueUserActivity:restorationHandler:) method in AppDelegate is called twice.

When I debug, both NSUserActivity objects are identical.

However, when I run the same Shortcut by tapping it manually, the method is only called once as expected.

Has anyone experienced this issue? How can I prevent Siri Shortcuts from delivering the same NSUserActivity twice?

Do you get the same behavior when testing the same paths in the SiriKit sample code project?

The other thing to look at is whether this reproduces the same way when using the scene lifecycle instead of the application lifecycle, since the application lifecycle is deprecated. Note that the sample project above uses the scene-based lifecycle, so if you're seeing the same behavior with that sample, then please file a bug report and post the FB number here.

— Ed Ford,  DTS Engineer

Hi Ed,

Thanks for the detailed response. I’d like to clarify one point: my app is still using the UIApplicationDelegate lifecycle and not the scene-based lifecycle.

Could this duplication be related specifically to using the AppDelegate lifecycle rather than the scene lifecycle? If so, is there a recommended way to handle or prevent the duplicate delivery without migrating to the scene lifecycle?

Thanks in advance for your guidance.

Siri Shortcut Passes NSUserActivity Object Twice
 
 
Q