Coordinator Pattern for iOS 12 and 13

As the awesome Swift master Paul puts it:

Using the coordinator pattern in iOS apps lets us remove the job of app navigation from our view controllers, helping make them more manageable and more reusable, while also letting us adjust our app's flow whenever we need. 

It is a darn useful pattern and something that since I learned about it, I used it in all my apps. Paul also released an advanced version as well of the original tutorial.

Patrick has a slightly different implementation of the same pattern and although I prefer Paul's approach (only slightly different in character) there are some nuances in his post that are definitely worth reading.

All that magic is challenged with iOS 13 because of the introduction of the UISceneDelegate. I hammered my head a few times before I got the clue of what had to be changed given that the window object is now no longer created in the AppDelegate but the SceneDelegate.

Mark describes the difference very well in this post. Something that I fail all the time to remember is to delete the content of the Main Interface, so don't forget that.


Popular posts from this blog

Bring Boxee Box back to life

Postgres on Synology

Zen-inification - The art of decluttering