-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global Stepper implementation #25
Comments
Hi @TobiasRe Thanks for your feedback. I think you could use the new "CompositeStepper" feature. In your AppDelegate you could something like that (adapt to your case of course) let deepLinkStepper = DeepLinkStepper()
let mainStepper = CompositeStepper(steppers: [OneStepper(withSingleStep: DemoStep.apiKey), deepLinkStepper])
coordinator.coordinate(flow: mainFlow, withStepper: mainStepper) DeepLinkStepper should be a custom Stepper that you have to write (just implement the Stepper protocol). You will trigger your instance of deepLinkStepper when a notification is received (DeepLinkStepper can have a function per notification type for instance). As it is associated to the MainFlow, Steps triggered by the DeepLinkStepper will be catched in that flow and you just have to implement the navigation in the switch statement of the navigate(to:) function. Does it fit with your needs ? |
Thanks @twittemb Yes the I guess the best to create an let deepLinkObservable = deepLinkSteps.sample(mainStepper.steps.filter{$0 == AppSteps.ready})
deepLinkObsersavable.subscribe(onNext: {step in
deepLinkStepper.accept(step)
}).disposed(by: disposeBag) or similar. |
This feature is currently on hold for me. I can create a PR when the |
@TobiasRe please make an issue or talk about the memory issues |
I really like the
RxFlow
approach for separating navigation with flows.Which works really well with navigating step by step as the user uses the app gets complicated with deep linking (e.g.: Navigating to ViewController after receiving a push notification).
How do I implement a global stepper for deep linking?
The
Stepper
should do the following:Step
Flow
Step
to the flowThe text was updated successfully, but these errors were encountered: