continue UserActivity in AppDelegate not working after firing completion(INSendPaymentIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity ))

func handle(intent: INSendPaymentIntent, completion: @escaping (INSendPaymentIntentResponse) -> Void) { if let _ = intent.payee, let currencyAmount = intent.currencyAmount { let userActivity = NSUserActivity(activityType: "com.rapipay.nye.test.failure") userActivity.userInfo = ["amount": Int(truncating: currencyAmount.amount!)] completion(INSendPaymentIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity )) return } }

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([any UIUserActivityRestoring]?) -> Void) -> Bool { print("ddddd") return true }

this code is perfectly working on simulator and even i fi user userActivity as nil, continue userActivity is called, but on device it is not called

Siri is working, asking for name and amount and handler is also called and opens app but does not pass intent or userActivity

Do you get the same results with just the relevant code in a small test project? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

—Ed Ford,  DTS Engineer

It was using the demo project provided by Apple, but i will share the github link as well -

https://github.com/DakshSingh2998/swiftUi-Siri

I have not modified code, just added continue Useractivity in app delegate, and .failureRequireAppLaunch in Intent handler

Any Updates? @DTS Engineer

found any solution?

Everything is working correctly here. You're not seeing the your logs because of process boundaries. I explain this for a different SiriKit debugging situation in this other thread. I took your logs and modified them to use the structured logging APIs, and then I can see that the main app launches and logs the message when continuing the user activity.

— Ed Ford,  DTS Engineer

i tried showing a ui toast in continue UserActivity still the toast was not working.

continue UserActivity in AppDelegate not working after firing completion(INSendPaymentIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity ))
 
 
Q