Swiftui: How can I navigate to a specific NavigationLink when user clicks on push notification?

前端 未结 1 1892
闹比i
闹比i 2020-12-20 22:24

I am using FCM with my ios push notification. How can I navigate to a specific navigation link when the user taps the push notification. Thank you in advance for your help!<

相关标签:
1条回答
  • 2020-12-20 22:55

    Assuming this callback is in AppDelegate, you can make AppDelegate owner of your shared object which is used as environment object, so you have access to it and in app delegate callbacks and in scene delegate to inject into content view.

    Please see my proposed approach for similar scenario in App Delegate Accessing Environment Object

    0 讨论(0)
提交回复
热议问题