Skip to main content

Fabric has been deprecated in favor of FirebaseCrashlytics

iOS14に向けてCocoapodsで管理してるパッケージのバージョンをあげたら以下のwraningが出た

[!] Crashlytics has been deprecated in favor of FirebaseCrashlytics
[!] Fabric has been deprecated in favor of FirebaseCrashlytics

これの対応策


・最初にやること
cocoapodsを更新

+    pod 'FirebaseAnalytics', '~> 6.8.2'
+    pod 'FirebaseCrashlytics', '~> 4.6.0'

そうすると以下の依存エラーが出る

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "nanopb":
  In Podfile:
    Firebase/Analytics (~> 6.23.0) was resolved to 6.23.0, which depends on
      Firebase/Core (= 6.23.0) was resolved to 6.23.0, which depends on
        FirebaseAnalytics (= 6.4.2) was resolved to 6.4.2, which depends on
          nanopb (= 0.3.9011)

    FirebaseCrashlytics (~> 4.6.0) was resolved to 4.6.0, which depends on
      nanopb (~> 1.30906.0)

[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
  In Podfile:
    Firebase/AdMob (~> 6.23.0) was resolved to 6.23.0, which depends on
      Firebase/CoreOnly (= 6.23.0) was resolved to 6.23.0, which depends on
        FirebaseCore (= 6.6.7)

    FirebaseAnalytics (~> 6.8.2) was resolved to 6.8.2, which depends on
      FirebaseCore (~> 6.10)

なので関連するFirebaseも最新にする

+    pod 'Firebase/AdMob', '~> 6.32.2'

 

・PB_LTYPE_BOOL
これでビルドすると以下のエラーがでる
これはCleanしてBuildしなおせば直る

firebasecore.nanopb.c:42:5: Use of undeclared identifier 'PB_LTYPE_BOOL'

 

・dSYMのアップロード
次は以下のエラーが出る

/Pods/Fabric/run: No such file or directory

これはBuildPhaseの該当箇所を以下にすればよい
input Filesは消して良い

"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

https://stackoverflow.com/questions/60821249/ios-and-firebasecrashlytics

GoogleService-Info.plistのパスが違ってる可能性があるのでエラーの場合はエラー文言見てください
Unable to read Google Service plist at path

 

こうしてビルドできましたとさ

関連記事:

Pocket