LoginSignup
6
5

More than 3 years have passed since last update.

Could not get GOOGLE_APP_ID in Google Services file from build environmentが出るときの解決法

Last updated at Posted at 2019-08-20

もしかして: Xcodegenをお使いではありませんか? もしくは、Crashlyticsのスクリプトをかなり序盤で使っていませんか?

原因

Fabric/runは、cocoapodのスクリプトの後に走らせないといけないところを、xcodegenでは必ず最後にcocoapodsのスクリプトを最後に走らせる暗黙の仕様があるので、問題が発生している。

解決方法

以上の記事にも書いてあるが、こんな感じでPodfile内にbuild phaseスクリプトを書けるドンピシャの機能があるので、これで実行順序を保証しつつ解決できる。もちろんXcodegenの機能で解決できるのが一番良いので、本体のGitHubにPR出すのが良さそう。

Podfile
target 'Project' do
    pod 'Fabric', '~> 1.10.2'
    pod 'Crashlytics', '~> 3.13.3'

    script_phase :name=> 'Fabric',
                 :script=> '"${PODS_ROOT}/Fabric/run"',
                 :input_files=> ['$SRCROOT/$PRODUCT_NAME/$(INFOPLIST_PATH)']
end
6
5
5

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
6
5