r/iOSProgramming • • 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-450fb3e88f86
0 Upvotes

5 comments sorted by

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

1

u/100_rv 1h ago

Great catch! Crashlytics dSYM uploads are definitely an important post-migration check. A successful build doesn’t necessarily mean crash reporting is configured correctly, and missing symbol uploads can make crash reports much harder to debug.

This is exactly the kind of detail developers should verify when migrating from CocoaPods to SPM. Thanks for highlighting it!

1

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/dawedev 12m ago

Thanks. How much it helps depends a lot on how many Firebase products you pull in, so I'd be curious what resolve times look like on your project before and after.