美文网首页
ios模拟器版本号,IPHONEOS_DEPLOYMENT_TA

ios模拟器版本号,IPHONEOS_DEPLOYMENT_TA

作者: 晓函 | 来源:发表于2022-01-15 12:21 被阅读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

相关文章

网友评论

      本文标题:ios模拟器版本号,IPHONEOS_DEPLOYMENT_TA

      本文链接:https://www.haomeiwen.com/subject/ahuthrtx.html