So it's not just me who wondered;)
Let me share with you my other post about MVP in iOS:
Screencast by David Gadd - It's a bit long (1h 20min) and a bit old (December 2012), but certainly worth a look. You will see how MVP is implemented (in AppCode) for a very small application (along with a pretty good description of how to write unit tests). The router created by David is called ServiceLocator. Unfortunately, I could not find the code for downloading this screencast (but when viewing it you can create your own version of this application).
There may be other ways to create a router, but this screencast helped me figure this out a bit more. I am new to the MVP concept and I have not used it in a larger application (more than single-screen-let-s-see-how-it-is-done-app). It would be great to see how MVP was implemented in a real application ...
[EDIT]
I just realized that I did not answer your first questions.
According to the application in screencast, a router is a class with one class method:
+ (id)resolve:(PresenterTypeEnum)type;
In implementing this method, you will find a simple switch. Based on the send type in the parameter method, it returns the correct instance of the master.
This method is called in viewDidLoad. When you have an instance of a facilitator, you just need to establish a representation of the facilitator using yourself.
I hope this explanation will be clear. In any case, I highly recommend watching screening, then it should be clean, like a crystal;)
source share