【发布时间】:2016-08-24 01:31:05
【问题描述】:
场景:基于 Alamofire 的网络应用。
我在最新的项目构建中遇到了不推荐使用的代码通知。我将其追溯到 Alamofire 中的以下语句。我没有看到任何关于替代品的提及。
@available(*, deprecated=3.4.0)
public static func errorWithCode(code: Int, failureReason: String) -> NSError {
let userInfo = [NSLocalizedFailureReasonErrorKey: failureReason]
return NSError(domain: Domain, code: code, userInfo: userInfo)
}
什么是替代品?
还有...如何确定已弃用代码的其他替换?
【问题讨论】: