LoginSignup
1
0

More than 1 year has passed since last update.

GitHub ActionsでFlutterをビルドする際「CocoaPods could not find compatible versions for pod "cloud_firestore"」エラーが発生する場合の対処

Posted at

概要

GitHub ActionsでFlutterアプリをビルドする際、以下のようなエラーが発生してしまいしばらくハマったため、
対処方法を記録します。

CocoaPods could not find compatible versions for pod "cloud_firestore"
(中略)
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

(エラーメッセージでググるとPodfileを書き換える記事がヒットしますが、Flutterではflutter build iosの過程でPodfileが生成されるため、この方法では対処できないと考えています)

対処方法

自分の場合は手元にMacOSがなくXCode経由で操作ができないため、
ios\Runner.xcodeproj\project.pbxproj 内の IPHONEOS_DEPLOYMENT_TARGET の値を 9.0 -> 11.0 に変更することで対処しました。
(Profile, Debug, Release用に3か所)

- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;

この変更を行ったところビルドが通ることを確認できました。

Running "flutter pub get" in flutter_tools...                      16.4s
Running "flutter pub get" in strollog...                            9.4s
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building *** for device (ios-release)...
Running pod install...                                            548.6s
Running Xcode build...                                          
Xcode build done.                                           1145.9s
Built /Users/runner/work/xxxx/xxxx/build/ios/iphoneos/Runner.app.

環境

Flutter: 2.10.1
GitHub Hosted Shared Runner: macOS 11
XCode: /Applications/Xcode_13.2.1.app

参考

1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0