Hey everyone,
I'm looking to migrate a large existing iOS project from using Cocoapods to the native Swift Package Manager (SPM). While SPM offers great benefits, the migration process for a project with many dependencies can be tricky. I've encountered a few hurdles and was hoping to get some community insights and best practices.
Specifically, I'm struggling with:
- Identifying equivalent SPM packages for all our current Cocoapods.
- Handling private dependencies (e.g., internal libraries).
- Ensuring compatibility and resolving version conflicts.
- Strategies for a phased or incremental migration.
Has anyone successfully navigated this transition? What tools or scripts did you find helpful? Any common pitfalls to watch out for?
Here's a snippet of our current Podfile for context:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '15.0'
target 'MyApp' do
use_frameworks!
pod 'Alamofire', '5.6.4'
pod 'Kingfisher', '7.0.0'
pod 'Firebase/Core', '9.0.0'
pod 'RealmSwift', '10.24.0'
// Internal library pod
pod 'MyInternalLibrary', :git => 'https://github.com/mycompany/MyInternalLibrary.git', :tag => '1.2.0'
end
Looking forward to hearing your experiences!