iTranslated by AI
[iOS] Migrating from Fabric SDK to the latest Firebase Crashlytics SDK
What is this?
This article is for iOS app developers who received an email stating:
[Action Required] Update your apps to use latest Firebase Crashlytics SDKs before November 15, 2020
- It is assumed that you have already completed the Firebase setup.
What is happening?
The Fabric Crashlytics SDK was deprecated in March 2020. After November 15, 2020, the reporting functionality will no longer be available.
What is required?
The following official documentation is easy to understand:
I will pick out the specific steps I performed from those instructions.
Update Podfile
From your Podfile, remove:
pod 'Fabric'
pod 'Crashlytics'
and replace it with:
pod 'Firebase/Crashlytics'
Make sure to add version 4.0.0 or later.
After that, run pod install.
Fix sharedInstance to crashlytics
Updating the Podfile alone will cause the build to fail.
This is because sharedInstance has been changed to crashlytics to maintain consistency with other Firebase SDKs.
Change instances of:
Crashlytics.sharedInstance().xxx
to:
Crashlytics.crashlytics().xxx
Update the run script name
The run script name has also been changed from Fabric to FirebaseCrashlytics.
Update the locations where you are executing scripts, such as in Build Phases, from:
${PODS_ROOT}/Fabric/run
to:
${PODS_ROOT}/FirebaseCrashlytics/run
Summary
In my project, these steps alone were enough to successfully build. However, if you are using other methods like setUserIdentifier, you can expect various errors to appear. In that case, you will need to update your source code one by one, referring to the official documentation below:
Discussion