Migrating to Swift Package Manager
Article Summary
Victor Sarda from Just Eat Takeaway reveals how his team migrated a massive modularized iOS codebase from CocoaPods to Swift Package Manager without blocking a single developer. The secret? Supporting both dependency managers simultaneously.
Just Eat Takeaway's iOS team tackled the challenge of migrating dozens of modules to SPM while multiple teams continued shipping features. They built custom tooling and established new conventions to make the transition seamless across demo apps and their main production app.
Key Takeaways
- Created PackageGenerator CLI tool to auto generate Package.swift files from JSON specs
- Unified structure supports both CocoaPods and SPM during migration period
- RemoteDependencies.json ensures pinned versions across all 60+ modules
- Bundle.module preprocessor macro handles resource access for both systems
- Completed full migration in one week after demo apps validated approach
Critical Insight
The team successfully migrated their entire modularized codebase to SPM by building automation tools and maintaining backward compatibility, enabling continuous development throughout the transition.