Alamofire - Alamofire.AFError.responseSerializationFailed - Xcode 8

I get an error in Alamofire.downloand and below:

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-FF8nfnntnfdnn

Can someone help solve the problem or run into the same problems?

thanks

+5
source share
1 answer

Change Alamofire.download to Alamofire.request, it will load. The exact answer to your question, check here

+5
source

All Articles