简体   繁体   中英

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

I have a conclution and since I am a beginner, I just want to get it confirmed by someone else.

In my iOS app (Swift 2.2, Xcode 7) that must support iOS 8, I use Alamofire for server communication. Now my conclusion is that I will not be able to migrate the app to Xcode 8 and Swift 2.3 or 3.0, since I then have to use Alamofire version 4 and that version doesn´t suport iOS 8. So my app has to keep Alamofire version 3 which means that it has to stay Swift 2.2 and Xcode 7. Did i understand this correctly?

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

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

No you can't Alamofire 4.0 requirements:

  • iOS and tvOS 9.0+, macOS 10.11.0+, watchOS 2.0+
  • Xcode 8.0+
  • Swift 3.0+

If you would like to use Alamofire on iOS 8 or macOS 10.9, use the latest tagged 3.x release which supports both Swift 2.2 and 2.3.

Reference

Alamofire 4.0 Migration Guide said,

If you would like to use Alamofire on iOS 8 or macOS 10.9, use the latest tagged 3.x release which supports both Swift 2.2 and 2.3.

So, if you want to update to Xcode 8, you can convert your project to Swift 2.3 and use Alamofire 3.5.0 . This release supports Swift 2.3 and iOS 8+.

试试我的叉子https://github.com/tonyli508/AlamofireDomain ,我提取了针对iOS 8的最新更改和禁用的流请求功能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM