Hi @mritunjay,
in some of my tests, it successfully downloaded after suspend/resume on iOS 14.4 too.
The test screen and the scenario are so simple, and the same actually. But, even for the same file, it's changing from time to time. This is my suspend and the resume methods:
swift
/// Pauses an AVAssetDownloadTask via given productId.
/// - Parameter productId: The productId.
@objc public func pauseDownload(for productId: String) {
var asset: Asset?
var task: AVAggregateAssetDownloadTask?
for (taskKey, assetValue) in activeDownloadsMap where productId == assetValue.productId {
asset = assetValue
task = taskKey
task?.suspend()
break
}
// Here: I'm sending a notification to the UI cases
}
/// Resumes an AVAssetDownloadTask via given productId.
/// - Parameter productId: The productId.
@objc public func resumeDownload(for productId: String) {
var asset: Asset?
var task: AVAggregateAssetDownloadTask?
for (taskKey, assetValue) in activeDownloadsMap where productId == assetValue.productId {
asset = assetValue
task = taskKey
task?.resume()
break
}
// Here: I'm sending a notification to the UI cases
}