johnpatrickmorgan / FlowStacks

FlowStacks allows you to hoist SwiftUI navigation and presentation state into a Coordinator
MIT License
783 stars 56 forks source link

Handle deeplinks/push-notifications #38

Closed jo8558 closed 1 year ago

jo8558 commented 2 years ago

I'm already sorry if the question is easy to answer, but I'm not yet familiar with iOS and SwiftUI, but I'm stuck since I do not know how to handle deeplinks or push notifications properly.

My current approaches end up either with nothing was happing or with an error due to: Accessing State's value outside of being installed on a View. This will result in a constant Binding of the init. I guess that this is because the function call to trigger the navigation was executed inside the AppDelegate.

It would be awesome if a sample could be provided for how deeplinks/push-notifications can be handled.

johnpatrickmorgan commented 2 years ago

Hi @jo8558, thanks for your question. I've added an example of deeplinking from a URL using onOpenURL which is an alternative to using an AppDelegate.