简体   繁体   中英

Value of type 'Result<String>' has no member 'error' [Alamofire, Swift 5]

As Swift 5 introduced Result type, so I am getting numerous errors with Alamofire.

Other Errors:

Enum case 'success' has no associated values
Member 'failure' in 'Result<T>' produces result of type 'Result<String>', but context expects 'Result<T>'

Any quick fix!

Change

Result

to

Alamofire.Result

Or create a typealias as,

typealias AFResult = Alamofire.Result

and change Result to AFResult .

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