Alamofire 5.11.0 发布,HTTP 网络开发工具包
Alamofire 5.10.0 已发布,Alamofire 是用一个功能强大的,用 Swift 语言编写的 HTTP 网络开发工具包,支持各种 HTTP Method、JSON、文件上传、文件下载和多种认证方法。具体更新内容如下:
Added
- 默认启用 Lazy Request 设置。
Request现在处于非活动状态,直至通过 resume() 方法激活(无论自动或手动)。若需恢复先前行为,可使用Session(requestSetup: .eager)。#3996 - Inline, per-
RequestRequestAdapter,RequestRetrier,RequestInterceptor,以及EventMonitorAPIs,用于在Request初始化后添加实例。#3996 - Per-
Requestautomaticresume()control, with theshouldAutomaticallyResumeparameter。#3996 OfflineRetrier,根据NWPathMonitor状态重试请求,作为NetworkReachabilityManager替代方案。#3948
Updated
- Alamofire 需要 Xcode 16.0 和 Swift 6 编译器(Swift 5 或 6 模式)。#3984
- 测试目标的部署目标应与 XCTest 和 Swift Testing 的可用性相匹配。#3990 #3996
Emptyto beHashable。#3985Request内部实现更多 atomic locking。#3948- iOS 17.4 及更高版本已弃用
NetworkReachabilityManager。#3947 - Linux 和 Android CI builds。#3929
Fixed
RetryPolicy中缺失的@Sendable。#3994- Usage.md 中的示例。#3955
- 从仓库中删除
.swiftpm文件夹,以防止 Xcode 在用作包时创建 Alamofire scheme。#3947
更新说明: https://github.com/Alamofire/Alamofire/releases/tag/5.11.0