![](/img/trans.png)
[英]Alamofire Value of type 'Result<Any, AFError>' has no member 'isSuccess' (Swift 5)
[英]Value of type 'Result<String>' has no member 'error' [Alamofire, Swift 5]
由于Swift 5引入了Result类型,因此我在Alamofire上遇到了很多错误。
其他错误:
Enum case 'success' has no associated values
Member 'failure' in 'Result<T>' produces result of type 'Result<String>', but context expects 'Result<T>'
任何快速修复!
更改
Result
至
Alamofire.Result
或者创建一个typealias
,
typealias AFResult = Alamofire.Result
并将Result
更改为AFResult
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.