Flutterで開発をしている時に発生しましたが、Flutterに限らずpod install
で発生しそうです。
事象
FlutterでiOS用のビルドをしようとした時にエラーが発生してビルドができなかった。
エラーログ
[!] CocoaPods could not find compatible versions for pod "Firebase/DynamicLinks":
In snapshot (Podfile.lock):
Firebase/DynamicLinks (= 6.16.0)
In Podfile:
firebase_dynamic_links (from `.symlinks/plugins/firebase_dynamic_links/ios`) was resolved to 0.1.0, which depends on
Firebase/DynamicLinks
It seems like you've changed the constraints of dependency `Firebase/DynamicLinks` inside your development pod `firebase_dynamic_links`.
You should run `pod update Firebase/DynamicLinks` to apply changes you've made.
対応
ログに書いてあるように
pod update Firebase/DynamicLinks
を実行すればOK。
Updating local specs repositories
$ /usr/local/bin/git -C /Users/daisuke-fukuda/.cocoapods/repos/master fetch origin
--progress
remote: Enumerating objects: 70155, done.
remote: Counting objects: 100% (70155/70155), done.
remote: Compressing objects: 100% (191/191), done.
remote: Total 462777 (delta 70035), reused 69954 (delta 69954), pack-reused 392622
Receiving objects: 100% (462777/462777), 52.19 MiB | 2.97 MiB/s, done.
Resolving deltas: 100% (320301/320301), completed with 10084 local objects.
From https://github.com/CocoaPods/Specs
c0cb914ff9d..c5ebf70bf1f master -> origin/master
* [new branch] orta-patch-1 -> origin/orta-patch-1
$ /usr/local/bin/git -C /Users/daisuke-fukuda/.cocoapods/repos/master rev-parse
--abbrev-ref HEAD
master
$ /usr/local/bin/git -C /Users/daisuke-fukuda/.cocoapods/repos/master reset --hard
origin/master
Checking out files: 100% (46886/46886), done.
HEAD is now at c5ebf70bf1f [Delete] podtestkcp1 0.1.0
CocoaPods 1.9.0 is available.
To update use: `gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.9.0
Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (1.9.0.beta.3) is higher than the version of the current executable (1.7.5). Incompatibility issues may arise.
Fetching podspec for `Flutter` from `Flutter`
Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
〜以下省略〜
Podfile.lockが更新されるので、忘れずにcommitしておく。
原因
Flutter側でfirebase関連のpluginを追加して依存関係が〜だと思いますが、久々のビルドだったのでちょっとわからなかったです。すいません。
その他調べたページ
CocoaPods could not find compatible versions for pod "FirebaseStorage" · Issue #727 · firebase/FirebaseUI-iOS
Step 1: Are you in the right place? For issues or feature requests related to the code in this repository file a GitHub issue. For general technical questions,

pod installが出来ない|teratail
・pod install;コマンド入力すると下記のエラーが表示されます。 【手順】1:cd ディレクトリ移動2:pod setup;3:pod install; 【エラー内容】 CocoaPods could not&n
podsについてあまり良くわかってないのだけど、npmみたいなものだから、こういう事もまああるのかな?
ちゃんと案内どおりにやればうまくいったし、ちゃんと動いていると思います。
コメント