Local Packages and Feature Modules
Extracting features into local Swift packages for faster builds and isolation.
Why Feature Modules?
Splitting an app into local packages enforces encapsulation, speeds up incremental builds, and enables team parallel development.
// Without modules: one giant target recompiles everything
// With modules: changes to FeatureA only recompile FeatureACreating a Local Package
Create a directory beside your Xcode project and run swift package init inside it.
mkdir Features/UserProfile
cd Features/UserProfile
swift package init --name UserProfile --type libraryAll lessons in this course
- Package.swift: Targets, Products and Dependencies
- Local Packages and Feature Modules
- Binary Targets and XCFrameworks
- Versioning, Resolving Conflicts and Swift Plugins