AVAggregateAssetDownloadTask_Resume

This repo presents simple demo application that shows issues with iOS devices. It is not possible to resume AVAggregateAssetDownloadTask after application termination.

Issue description:

Unable to resume the AVURLAsset download (created with aggregateAssetDownloadTask) after application termination.

Screenshot


Observed result:

The download is not resumed after the application is restarted. On older iOS versions observe the followinf error:

AVAggregateAssetDownloadTask[329:15754] Task <D19A0662-0C19-429B-A1A9-97C33BDE56C1>.<1> load failed with error Error Domain=NSURLErrorDomain Code=-999 "(null)" UserInfo={NSURLErrorBackgroundTaskCancelledReasonKey=0, NSErrorFailingURLStringKey=https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8, NSErrorFailingURLKey=https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "BackgroundAVAssetDownloadTask <D19A0662-0C19-429B-A1A9-97C33BDE56C1>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundAVAssetDownloadTask <D19A0662-0C19-429B-A1A9-97C33BDE56C1>.<1>} [-999]

Expected result:

The download resumes and all delegates with progress are called again.

Sample code is available also here:

https://github.com/mackode/AVAggregateAssetDownloadTask_Resume

GitHub

View Github