To run the example project, clone the repo, and run pod install
from the Example directory first.
Coordinators is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Coordinators'
A Coordinator is an object that owns a discrete section of your app's logic. One common practise is to use one Coordinator per user story. When coupled with MVVM, the Coordinator becomes the ideal place to convert your model to a view model and vice-versa, instantiate the view controller with the view model and pushing it to the navigation stack. The Coordinator should also be responsible from bridging your business logic for the user story (which should be contained within the view model) with the service layer of your application (e.g. networking with your API, persisting data on Realm or Core Data, etc).
A single Coordinator can have from zero to n children meaning your application flow gets represented as a tree structure. When moving to a new user story, the current coordinator should instantiate the appropriate new coordinator and start it. The new coordinator becomes a part of the tree when started and removes itself when finished.
Raphael Cruzeiro, [email protected]
Coordinators is available under the MIT license. See the LICENSE file for more info.