簡體   English   中英

我可以將Alamofire更新到版本4,並且在我的應用程序中仍然支持iOS 8嗎?

[英]Can I update Alamofire to version 4 and still support iOS 8 in my app?

我有一個結論,由於我是初學者,所以我只想得到其他人的確認。

在必須支持iOS 8的iOS應用(Swift 2.2,Xcode 7)中,我使用Alamofire進行服務器通信。 現在的結論是,我將無法將該應用程序遷移到Xcode 8和Swift 2.3或3.0,因為那時我必須使用Alamofire版本4,並且該版本不支持iOS8。因此,我的應用程序必須保留Alamofire版本3表示必須保留Swift 2.2和Xcode7。我是否正確理解這一點?

Alamofire 4要求: https : //github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md

Alamofire 3要求: https : //github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md

不,您不能滿足Alamofire 4.0的要求:

  • iOS和tvOS 9.0 +,macOS 10.11.0 +,watchOS 2.0+
  • Xcode 8.0+
  • 迅捷3.0+

如果您想在iOS 8或macOS 10.9上使用Alamofire,請使用最新的加標簽的3.x版本,該版本同時支持Swift 2.2和2.3。

參考

Alamofire 4.0遷移指南說,

如果您想在iOS 8或macOS 10.9上使用Alamofire,請使用最新的加標簽的3.x版本,該版本同時支持Swift 2.2和2.3。

因此,如果要更新到Xcode 8,可以將項目轉換為Swift 2.3並使用Alamofire 3.5.0 此版本支持Swift 2.3和iOS 8+。

試試我的叉子https://github.com/tonyli508/AlamofireDomain ,我提取了針對iOS 8的最新更改和禁用的流請求功能。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM