草庐IT

ios - Alamofire - Alamofire.AFError.responseSerializationFailed - Xcode 8

coder 2023-09-25 原文

我在 Alamofire.downloand 中收到如下错误:

Alamofire.download(URLString).responseData { response in

            if let data = response.result.value {
                let image = UIImage(data: data)
            }else{
                print(response.result.error)
            }
        }

Alamofire.AFError.responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.inputFileReadFailed(file:///private/var/mobile/Containers/Data/Application/40167F58-FF4A-4D19-B01A-F8ED90F794DD/tmp/CFNetworkDownload_1dnNQR.tmp)))

任何人都可以帮助解决它或面临同样的问题吗?

谢谢

最佳答案

Alamofire.download 更改为 Alamofire.request,它将下载。您的问题的确切答案,check here

关于ios - Alamofire - Alamofire.AFError.responseSerializationFailed - Xcode 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39585365/

有关ios - Alamofire - Alamofire.AFError.responseSerializationFailed - Xcode 8的更多相关文章

随机推荐