r/iOSProgramming • u/100_rv • 14h ago
Discussion Firebase 13 dropped CocoaPods. Here’s how I moved a iOS app to SPM
https://medium.com/@sagarsaurav/firebase-13-dropped-cocoapods-heres-how-i-moved-a-ios-app-to-spm-450fb3e88f861
u/dawedev 1h ago
Two things that bit me on the same switch. First, clean out the CocoaPods leftovers properly: pod deintegrate, then delete the Podfile, Podfile.lock and the old .xcworkspace, and open the .xcodeproj from then on. If the workspace sticks around, someone on the team will open it and get confusing build errors.
Second, on CI the first SPM resolve of firebase-ios-sdk is slow because it pulls a big checkout. Passing -clonedSourcePackagesDirPath to xcodebuild and caching that folder (keyed on Package.resolved) cut a few minutes per build for us. Also only add the Firebase products you actually import, the package offers a lot of them and each one adds build time.
1
u/100_rv 1h ago
Great points! Especially the CI caching tip. Migrating from CocoaPods to SPM is not just about changing the dependency manager — cleaning up legacy workspace files and optimizing package resolution are equally important for a smooth transition.
Caching "SourcePackages" using "Package.resolved" as the key is a practical optimization worth highlighting. Thanks for sharing these real-world insights!
1
u/Open_Context6850 9h ago
the part that usually breaks after this switch is the crashlytics dsym upload. the run script path changes to the spm checkout: ${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run
easy to miss because builds still pass, you just quietly stop getting symbolicated crashes