【Flutter】Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified.のエラー対処方法

Flutter

「flutter run」でCocoaPodsからiOSバージョンに関するエラーが発生したので、解決方法をメモしておきます。

エラー内容

Flutterでアプリ開発を始めた際に、Terminalで

flutter run

を実行したところ、次のエラーが発生しました。

Error output from CocoaPods:
↳

    [!] 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`.

解決方法

プロジェクトのiosフォルダの「Podfile」を開きます。

「platform :ios, ‘9.0’」のコメントを解除します。

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'    # コメント解除

再びTerminalで

flutter run

を実行します。

これで先程のエラーは解消しました。

タイトルとURLをコピーしました