Swift iOSDev FirebaseCrashlytic from CocoaPod to SPM

Mario tsai
2 min readApr 26, 2021

--

try to break up CocoaPod with Swift Package Manager

1, we assume your are using cocoaPod now.

Environment Xcode12+

Save your upload-symbols, we still need it

2, Go to https://github.com/firebase/firebase-ios-sdk

3. Xcode SPM

select “FirebaseCrashlytic”

So now we have all we need from SPM.

4, open your Pod.file

remove firebaseCrashlytic by “Blank”

and open terminal cd your project, enter command line “pod install”

We need to do this step to remove clear CocoaPod files.

Do not forgot install Pod again

5, open Project instead of workspace and delete “Framework file”

So far you can build sussufully

6. But if you want to upload to Appstore,

enter to Post-Action

rm -rf "${TARGET_BUILD_DIR}/${TARGET_NAME}.app/Frameworks/FirebaseAnalytics.framework"
rm -rf "${TARGET_BUILD_DIR}/${TARGET_NAME}.app/Frameworks/GoogleAppMeasurement.framework"
rm -rf "${TARGET_BUILD_DIR}/${TARGET_NAME}.app/Frameworks/FIRAnalyticsConnector.framework"

7. Final, upload your dSym file.

Use 1, upload-symbols file, command line

“where is your upload-symbols path” -gsp “where is your google-service file path” -p iOS “where is your dSYM file path”

8. All the work done>!!!!

--

--

Mario tsai

Major in physical education. Football referee. And high interest in looking the world through the numbers.