🎃

Dart update後、iOS buildが失敗する

2023/05/21に公開

エラー内容

iOS buildの際にエラーがでる。

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update



Error running pod install
Error launching application on iPhone SE (3rd generation).

原因

Firebase のversionとcocoapodsの整合性が取れなくなったこと

解消手順

1.cmdから cocoapodsをupdate

brew upgrade cocoapods

iOSディレクトリに移動後、下記コマンドで、エラーが出る。

pod install --repo-update

firebase_database: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In snapshot (Podfile.lock):
    Firebase/CoreOnly (= 10.0.0)

  In Podfile:
    firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 2.4.1, which depends on
      Firebase/CoreOnly (= 10.3.0)


You have either:
 * changed the constraints of dependency `Firebase/CoreOnly` inside your development pod `firebase_core`.
   You should run `pod update Firebase/CoreOnly` to apply changes you've made.

2.

pod update Firebase/CoreOnly

  1. flutter clean をしてbuildできた

Discussion