将以下行添加到Pod文件后,我收到以下版本冲突
pod 'TRON', '~> 4.1.0'
错误:
SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SwiftyJSON')
最新的TRON发布版本是5.0.0-beta.1,它支持Swift 5。早期版本没有swift 5支持。您似乎使用的是TRON 4.1.2版本,该版本仅支持Swift 4.0,甚至不支持4.1或4.2。因此,在较新的Swift中使用旧版本之前要三思而后行。
其他观察:
看起来只有4.3版本的Swift 5支持“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。