i am using this code for download video and it will give me an error the code is given below
let videoImageUrl = "my_video_link"
AF.request(videoImageUrl).downloadProgress(closure: { (progress) in
// print(progress.fractionCompleted)
}).responseData { (response) in
// }
if let data = response.result.value {
// my code
}
The
response.result
isResult<Data, AFError>
, and it doesn't have thevalue
property. You can do it this way:Or