Module
A unit of code compiled on its own and imported by name, such as an app target, a framework or a Swift package target.
Definition
Swift code lives in modules: the app target is one, and every Swift package target is another. Declarations are internal by default, visible only inside their module, so anything another module uses must be public. Splitting an app into modules gives clear boundaries, faster incremental builds and code that can be tested and previewed on its own.
In practice
A DesignSystem module holds the app's colors and buttons; feature modules import it, and it imports nothing from them.
Learn it in context
Lessons that use this term.