Code Monkey home page Code Monkey logo

Comments (4)

sirvon avatar sirvon commented on May 19, 2024 3

@TobiasRe please make an issue or talk about the memory issues

from rxflow.

TobiasRe avatar TobiasRe commented on May 19, 2024 1

Thanks @twittemb

Yes the CompositeStepper helps, if I including navigation to the corresponding sub flows in my MainFlow.
The issue that remains is how to handle deep linking on app start. Especially if the app needs some kind of bootstrapping/login before the app is ready to handle the deep link.

I guess the best to create an Observable where the deep link step is queued until the app is ready.

let deepLinkObservable = deepLinkSteps.sample(mainStepper.steps.filter{$0 == AppSteps.ready})
deepLinkObsersavable.subscribe(onNext: {step in 
    deepLinkStepper.accept(step)
}).disposed(by: disposeBag)

or similar.

from rxflow.

TobiasRe avatar TobiasRe commented on May 19, 2024 1

This feature is currently on hold for me.
There are serious memory management issues with RxFlow to fix first.

I can create a PR when the Deeplink Stepper implementation is done.
Let's close this for now.

from rxflow.

twittemb avatar twittemb commented on May 19, 2024

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 ?

from rxflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.