FlutterでThe iOS Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’みたいなwarningが出るときの対処法

2020-09-29
プログラミング
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99

上記みたいなWarningがたくさん吐かれた場合、ios/Podfileを以下のコードのように3行追加すると消える

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    # 追加する3行
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
  end
end