如何修复 pod lib lint 在 iOS 上无法识别 UIColor.label 13

How to fix pod lib lint not recognising UIColor.label on iOS 13

我正在更新我的 pod 以支持 iOS 13 上的暗模式。我在我的 podspec 文件和我的 pod 构建设置中都使用 Swift 5.0。当 运行ning pod lib lint 时,我收到一条错误消息,提示 UIColor 没有成员 'label'。

项目 运行 在 Xcode 11 beta GM 上成功。

我期待 pod lib lint 成功 运行 但我收到如下错误:

error: type 'UIColor?' has no member 'label'

有什么我遗漏的吗?

已通过将命令行工具更改为使用 Xcode11 来修复。

  1. 打开Xcode11
  2. 打开首选项
  3. 单击“位置”选项卡
  4. 更改命令行工具以使用 Xcode11