SwiftUI `onOpenURL` lacks `referrerURL` and `annotation` present in NSUserActivity

Hello, I am working on an application that utilizes both AppDelegate and SceneDelegate. We are looking to convert the top level app to SwiftUI and start using the SwiftUI App lifecycle. When implementing, I see that deep links when the app is backgrounded will only route to the onOpenURL modifier. This means that information we relied on before like referrerURL and annotation present in the NSUserActivity object delivered to the app is no longer available. Is there any work around for this? It seems like missing functionality because there is no way to route the deep links through AppDelegate or SceneDelegate if you are using the SwiftUI App protocol.

Answered by DTS Engineer in 788545022

This is not available when using the SwiftUI life cycle because all universal links are routed through onOpenURL. If you or anyone coming across this post in the future would like to see this functionality, please submit an enhancement report at https://feedbackassistant.apple.com and post the FB number here in the comments. Thank you!

This is not available when using the SwiftUI life cycle because all universal links are routed through onOpenURL. If you or anyone coming across this post in the future would like to see this functionality, please submit an enhancement report at https://feedbackassistant.apple.com and post the FB number here in the comments. Thank you!

Thank you, here is the FB number: 13818612

SwiftUI `onOpenURL` lacks `referrerURL` and `annotation` present in NSUserActivity
 
 
Q