[英]How to add Alamofire in Xcode 10.1
在使用 CocaPods 添加 Alamofire 后編譯應用程序時出現以下錯誤。
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Alamofire')
Podfile: pod 'Alamofire', '~> 5.0.0-beta.5'
我正在點擊鏈接在我的Swift 5
項目中添加 Alamofire
Xcode Version: 10.1
Swift 5
對Xcode
支持已在version 10.2
中添加。 要在Swift 5
使用Alamofire
,您需要更新您的Xcode
版本。 其他建議是將您的Alamofire
版本降級到4.8.2
或在 pod 設置中將Swift
版本更改為4.2
。
XCode 10.2
Swift 5
版本支持。 您不能在XCode 10.1
使用Alamofire的測試版。 要在XCode 10.1版本中使用Alamofire ,您可以簡單地使用它
pod 'Alamofire'
代替
pod 'Alamofire', '~> 5.0.0-beta.5'
希望這會有所幫助。
將 Xcode 更新到 10.2 或下載支持 Swift 5.0 的最新 Xcode。 最好保持更新,而不是將任何庫的最新版本用於舊的 Xcode 版本。 從 Xcode 10.2 開始支持 Swift 5
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.