実現したいこと
- 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
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。