iOSアプリでFirebaseとGoogleMobileAdsSDK両方使っているときに、CocoaPodsでFirebaseだけバージョンをあげてpod installしようとすると以下のようなエラーがでる場合があります。
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
In snapshot (Podfile.lock):
GoogleAppMeasurement (< 11.0, = 10.12.0, >= 7.0)
In Podfile:
Firebase/Analytics (~> 10.13.0) was resolved to 10.13.0, which depends on
Firebase/Core (= 10.13.0) was resolved to 10.13.0, which depends on
FirebaseAnalytics (~> 10.13.0) was resolved to 10.13.0, which depends on
FirebaseAnalytics/AdIdSupport (= 10.13.0) was resolved to 10.13.0, which depends on
GoogleAppMeasurement (= 10.13.0)
FiveGADAdapter (~> 1.4.1) was resolved to 1.4.1, which depends on
Google-Mobile-Ads-SDK (>= 9.0.0) was resolved to 9.14.0, which depends on
GoogleAppMeasurement (< 11.0, >= 7.0)
これはFirebaseが使っているGoogleAppMeasurementがアップデートされたときに起こるエラーで、GoogleMobileAdsもGoogleAppMeasurementを利用しているのでこのようなエラーが発生します。
この場合、以下のようにGoogleMobileAdsSDKをアップデートすると解決します。
pod update Google-Mobile-Ads-SDK