【问题标题】:Minimum iOS deployment version of flutter packageFlutter包的最低iOS部署版本
【发布时间】:2021-04-28 18:08:44
【问题描述】:

我已经编写了一个本地使用的颤振包,我正在尝试使最低部署版本工作,以便没有设备

我使用 xcode 在库中设置了以下内容(不确定是使用 xCode 还是手动编辑文件)

并且还手动编辑了库 ios/.podspec 文件以具有以下内容

  s.dependency 'Flutter'
  s.platform = :ios, '11.0'
  s.ios.deployment_target = '11.0'

当我使用库在应用程序的 IOS 目录中运行 pod install(也尝试 pub get)时,它会打印以下内容

[!] The platform of the target `Runner` (iOS 9.0) may not be compatible with `<LIBRARY_NAME> (x.x.x)` which has a minimum requirement of iOS 11.0.

我还在 ios/Podfile 中将应用设置为 ios 9.0(应该会出错)

例如

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'

当我运行应用程序构建、安装和运行良好。我还尝试在 pod 安装之间清理 pod 缓存。

有人可以解释我做错了什么或遗漏了什么吗,当构建大约需要 5-10 分钟时,反复试验并不能真正起作用:(

当还有 deployment_target 时,我也不太明白 s.platform = :ios, '11.0' 在 iOS podspec 中的设置是什么?

谢谢

【问题讨论】:

    标签: ios xcode flutter


    【解决方案1】:

    在您的 pod 文件中将 9.0 更改为 11.0。

    platform :ios, '11.0'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-07-23
      • 2020-04-27
      • 1970-01-01
      • 1970-01-01
      • 2016-09-23
      • 1970-01-01
      • 2014-01-06
      相关资源
      最近更新 更多