YCDownloadSession
YCDownloadSession copied to clipboard
resumeDownloadTaskWithTid always failed
let task = YCDownloader.downloader().resumeDownloadTask(
withTid: "b7d202f9a6fcb0fa476b530e98d3fc2f") { progress, sender in
let percent = Double(progress.completedUnitCount) / Double(progress.totalUnitCount) * 100
let percentInt = Int(percent)
print("this is process \(percentInt)% \(sender.taskId)")
} completion: { location, error in
if let err = error {
print("this is error \(err)")
} else {
print("this is loaction \(location ?? "")")
}
}
print("this is taskId \(task!.taskId)")
I killed app while the download is in processing, and reopen the app again.
And will always get error: resume requst failed 1004
Colud you do some help?