【问题标题】:Alamofire - Alamofire.AFError.responseSerializationFailed - Xcode 8Alamofire - Alamofire.AFError.responseSerializationFailed - Xcode 8
【发布时间】:2017-01-27 20:42:49
【问题描述】:

我在 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) ))

谁能帮助解决它或面临同样的问题?

谢谢

【问题讨论】:

  • URLString 的值是多少,所以我们也可以测试该图像?
  • 测试网址:qqxxzx.com/images/cute-wallpaper/cute-wallpaper-10.jpg
  • Alamofire download issue的可能重复

标签: ios alamofire xcode8


【解决方案1】:

Alamofire.download改成Alamofire.request,就可以下载了。您的问题的确切答案,check here

【讨论】:

    猜你喜欢
    • 2016-11-08
    • 1970-01-01
    • 2017-01-16
    • 2017-02-20
    • 2017-06-14
    • 1970-01-01
    • 1970-01-01
    • 2017-01-15
    • 1970-01-01
    相关资源
    最近更新 更多