-1

将以下行添加到 Pod 文件后,出现以下版本冲突

pod 'TRON', '~> 4.1.0'

错误:

   SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SwiftyJSON')
4

1 回答 1

0

最新的 TRON 发布版本是 5.0.0-beta.1,它支持 Swift 5。早期版本不支持 swift 5。您似乎正在使用仅支持 Swift 4.0 甚至不支持 4.1 或 4.2 的 TRON 4.1.2 版本。所以在新的 Swift 中使用旧版本之前要三思。

其他观察:

Swift 5 似乎仅在 4.3 版本中支持“SwiftyJSON”。我刚刚尝试在 Xcode 10.1 和 Swift 4.2 中安装 TRON,并且安装时没有任何问题。但它只下载了不支持 Swift 5 的 SwiftyJSON 4.2 版本。请在下面找到详细信息。

platform :ios, '9.0'

target 'TestProject' do
  use_frameworks!

  # Pods for TestProject

pod 'TRON', '~> 4.1.0'
end

安装日志:

Analyzing dependencies
Downloading dependencies
Installing Alamofire (4.7.3)
Installing SwiftyJSON (4.2.0)
Installing TRON (4.1.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installed.

Alamofire 和 SwiftyJSOn 会自动下载。因此请尝试在您的 pod 文件中的 TRON 之前添加 SwiftyJSON 4.3。

于 2019-04-06T06:22:32.887 回答