ios模拟器版本号,IPHONEOS_DEPLOYMENT_TA

2022-01-15  本文已影响0人  晓函

使用map_lunchuner在ios模拟器的时候提示错误

/Develop/flutter/.pub-cache/hosted/pub.flutter-io.cn/map_launcher-2.1.2/ios/Classes/SwiftMapLauncherPlugin.swift:107:30: error: 'open(_:options:completionHandler:)' is only available in iOS 10.0 or newer

UIApplication.shared.open(URL(string:url)!, options: [:], completionHandler: nil)

Projects/Flutter/hemayouyou/ios/Pods/Pods.xcodeproj: 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 15.2.99\. (in target 'Toast' from project 'Pods')

解决:
在Podfile最下面post_install do中添加
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'

完整代码

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
      end
    end
end
上一篇 下一篇

猜你喜欢

热点阅读