質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Flutter

Flutterは、iOSとAndroidのアプリを同じコードで開発するためのフレームワークです。オープンソースで開発言語はDart。双方のプラットフォームにおける高度な実行パフォーマンスと開発効率を提供することを目的としています。

Q&A

解決済

1回答

848閲覧

CocoaPods could not find compatible versions

ituking

総合スコア80

Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Flutter

Flutterは、iOSとAndroidのアプリを同じコードで開発するためのフレームワークです。オープンソースで開発言語はDart。双方のプラットフォームにおける高度な実行パフォーマンスと開発効率を提供することを目的としています。

0グッド

0クリップ

投稿2023/06/08 18:11

編集2023/06/09 05:55

実現したいこと

  • CocoaPods could not find compatible versionsを解決させてビルドを成功させる。

前提

Flutterで新しいパッケージ(permission_handler: ^10.3.0)を追加して、保存後pub getしたところ、以下のエラーが発生。

発生している問題・エラーメッセージ

[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore": In Podfile: FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.9.0`) cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.4.4, which depends on Firebase/Firestore (= 10.7.0) was resolved to 10.7.0, which depends on FirebaseFirestore (~> 10.7.0)

該当のソースコード

Podfile.ruby

1# Uncomment this line to define a global platform for your project 2platform :ios, '11.0' 3 4# CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 7project 'Runner', { 8 'Debug' => :debug, 9 'Profile' => :release, 10 'Release' => :release, 11} 12 13def flutter_root 14 generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 unless File.exist?(generated_xcode_build_settings_path) 16 raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 end 18 19 File.foreach(generated_xcode_build_settings_path) do |line| 20 matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 return matches[1].strip if matches 22 end 23 raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24end 25 26require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 28flutter_ios_podfile_setup 29 30target 'Runner' do 31 use_frameworks! 32 use_modular_headers! 33 34 pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.9.0' 35 flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 36end 37 38post_install do |installer| 39 installer.pods_project.targets.each do |target| 40 flutter_additional_ios_build_settings(target) 41 end 42end 43

試したこと

エラー発生後、flutter clean→pub get→flutter runをしたところ、再度同様のエラー発生。
CocoaPods could not find compatible versions for pod "FirebaseFirestore":でググったところ、以下のページにヒット。
https://stackoverflow.com/questions/56055142/cocoapods-could-not-find-compatible-versions-for-pod-firebase-coreonly
上記のページに記載されている、pod installやpod repo update、pod install --repo-update、pod update、Podfile.lockの削除など試せるものは試したものの解決できず、3時間ほど経過。有識者の方々のお力をお借りしたいと考えています。

補足情報(FW/ツールのバージョンなど)

[✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1
22E772610a darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices
(Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.78.2)
Scanning for devices is taking a long time...[✓] Connected device (3 available)
[✓] HTTP Host Availability

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

cloud_firestoreを4.4.0から4.8.0(最新版)に更新し、pub get、pod install、flutter runを行ったところ、ビルド成功。
どうやら、cloud_firestoreのバージョンが古かったことが原因だったっぽい。

投稿2023/06/09 06:11

ituking

総合スコア80

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問