I'm trying to download HLS assets using AVAggregateAssetDownloadTask. It's pretty stable on iOS < 16.0. But after updating to iOS 16 I'm getting randomly following error:
Task <DB57343C-5D3A-4500-A886-A30FD16AD2C3>.<3> finished with error [-12640] Error Domain=CoreMediaErrorDomain Code=-12640 "(null)" UserInfo={_NSURLErrorRelatedURLSessionTaskErrorKey=(
"BackgroundAVAssetDownloadTask <DB57343C-5D3A-4500-A886-A30FD16AD2C3>.<3>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundAVAssetDownloadTask <DB57343C-5D3A-4500-A886-A30FD16AD2C3>.<3>}
Few retry attempts usually solve the issue. I have compared requests made by the app using proxy server and .m3u8 playlist does not differ between successful and failed download attempts.
This is the network traffic when download fails. It stops on ...Audio_Selector.m3u8 playlist.
And this is the network traffic when download successfully continues:
Thanks!