ある日Flutterアプリをビルドするとこんなエラーが出ました。
[!] 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`.
そのままGoogle翻訳に打ち込むと以下です。
[!]プラットフォームが指定されていないため、ターゲットRunner
にバージョン9.0
のプラットフォーム iOS
を自動的に割り当てます。 Podfileでこのターゲットのプラットフォームを指定してください。 https://guides.cocoapods.org/syntax/ podfile.html#platform
を参照してください。
どうやらプロジェクトで使用している何かしらの外部ライブラリが古いiOSバージョンに対応していなくてコケているらしい。
ということなので、iOSディレクトリのPodfileを開いて2行目に記載されているplatformのコメントアウトを解除してプラットフォームのバージョンを’10.0’に指定してあげたら解決しました。
<meta charset=”utf-8″>~/ios/Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
↑コメントを外してバージョンを10.0に変更
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
...