Skip to content
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

Could You create a login scene on this Demo. #5

Open
anilabsinc-ajay opened this issue Mar 21, 2018 · 3 comments
Open

Could You create a login scene on this Demo. #5

anilabsinc-ajay opened this issue Mar 21, 2018 · 3 comments
Labels

Comments

@anilabsinc-ajay
Copy link

I am learning the VIP architecture for the upcoming project. I need a simple example to user VIP on login scene. Thanks.

@Mijail
Copy link
Contributor

Mijail commented Mar 21, 2018

Hi, we are currently very busy so we can't get much time to work on this templates. The ones we are currently using have changed a lot, and need some tweaks so they can be used by everyone.

In the meantime I can give you some tips if you want:

We use a landingScene when the app opens, this scene is the responsible of routing to a loginscreen (if there is no token) or to a homeScreen (name depends on what it is represented). The login screen asks the interactor to perform login.
let request = LoginScene.PerformLogin.Request(username: email, password: password) interactor?.performLogin(request: request)
the interactor has 2 workers, one that validates the input, and the other that talks to the AuthStore to perform the login if any of those workers fails, we call the presenter to present the error. Otherwise we login, save the credentials and route to the next scene.

Hope that helps

@anilabsinc-ajay
Copy link
Author

anilabsinc-ajay commented Mar 21, 2018

The same thing does in my last app with simple MVC and a Service layer where auth logic is written. So how could we achieve this with VIP?
With VIP
Do I have to create all the files for this or I could do all these in one file that is the view controller
Could you provide a sample app for this?
Is worker required for landing scene. or could you suggest some tutorial.

@anilabsinc-ajay
Copy link
Author

Have there is any plan to update the templates for xcode 9.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants