0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Swift】XcodeGenを使用している場合のFirebaseCrashlyticsのRunScriptの設定

Last updated at Posted at 2023-03-07

はじめに

FirebaseCrashlyticsを導入したらエラーが出るようになりました。
原因がXcodeGenだったので記録しておきます。

エラー

スクリーンショット 2023-03-07 18.26.58.png

原因

XcodeGenでBuildScriptを設定する方法が複数ありました。

  • preBuildScripts
  • postCompileScripts
  • postBuildScripts

実行される順番が違うようです
今回の場合はGOOGLE_APP_IDが読み込まれる前にFirebaseCrashlyticsが実行されていました。

解決方法

project.yml
postBuildScripts:
  - name: Run FirebaseCrashlytics
    script: '"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"'
    inputFiles:
        - ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
        - $(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

おわり

こんな落とし穴があるとは。。。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?