
Outline course requirements and the benefits of iOS modularization—faster builds, isolated teams, and easier rebases—while introducing mvvmc, package-based modularization, dependency containers, and circular dependency solutions.
Explore a simple iOS app with a tab bar controller, a home page and a song list, and song and artist detail pages using mock data and a loading spinner.
Learn how to unit test the home view model with mocks, setup, and expectations to verify song fetch on first appear, avoid refetch, and track navigation and analytics events.
Design and implement a dependency container in a new Swift package, configuring single instance and closure-based dependencies, using object identifiers, and preparing registration and resolving methods.
Develop and test a Swift dependency container: register and resolve single instance and closure based dependencies using an object identifier, threaded access, and fatal errors for missing registrations in code.
Create a dedicated analytics implementation package and move the analytics event tracker into it, enabling the main project to remain lightweight while other packages import the analytics interface.
Import and wire the analytics package in the main project, expose the analytics event tracker publicly, and demonstrate path management and modularization to loosely couple interfaces and implementations.
Create a utilities package for extensions, including a public localized strings extension, integrate it into the main iOS project, and plan subpackages for foundation and UIKit to avoid circular dependencies.
Modularize app features by creating an artist detail package and moving the detail and artist code into dedicated modules, preparing for error states, tests, and interface wiring.
Continue artist details implementation by importing analytics interface, common models, and dependency container into the retail module, configuring relative package paths, and resolving build issues with explicit imports.
Move the home module to its own implementation package, add dependencies and tests, and expose a home gateway for initialization. Prepare the project for localization across packages.
Learn to integrate the localization package across the main project and subpackages, switch to localized common extensions, and display localized strings in home, song details, and artist details views.
Learn how to modularize localization by moving song details strings from the localization package into the song details package, using a bundle-based localized string extension and resources for localizable files.
Congratulations on completing the course, and thank you for joining me on this modularisation journey. Make sure to download the final project from the resources, if you didn't code along :)
Welcome to the Scalable iOS Modularization Course. The ultimate course for iOS Modularization with Swift Packages.
In this 4 hour long, code-along content, you will learn:
How to create packages for common functionalities
How to create interface packages for dependencies and loosely couple them to your features
How Dependency Containers work and how you can implement your own
Creating packages for feature modules and fixing the circular dependency problem with interface/implementation package approach
MVVM-C architecture with SwiftUI
How to write unit tests
Are you an iOS Engineer who is looking to improve their skills? Then you are in the right place! Modularization is a vital part of iOS development that becomes more and more important as the size of the project and the team grows. By using the latest modularization tool Swift Packages provided by Apple, and learning the interface/implementation package approach, you will be able to loosely couple, connect, manage, and maintain the modules of your application. You will have a better understanding of distinct pieces of your project, easily build different parts, and iterate without worrying about building the whole project.
We will start by reviewing an existing iOS Project and will bring it to the modularized state, step by step. Along the way, you are also going to learn about DispatchQueues and Unit Testing approaches. You will be able to iterate on your codebase with SwiftUI previews and focus on certain modules of the application in isolation with Swift Packages.
Lets get started!