I have an issue where I use following config for downloads:
let assetConfiguration = URLSessionConfiguration.background(withIdentifier: HlsDownloadProvider.hlsBackgroundIdentifier)
assetDownloadQueue.qualityOfService = .utility
assetConfiguration.isDiscretionary = true
assetConfiguration.sessionSendsLaunchEvents = true
assetConfiguration.shouldUseExtendedBackgroundIdleMode = true
When using Discretionary mode set to TRUE as recommended by Apple, I see issue where devices with lower battery level complete first download task while the app is minimized, but the next initialized download task does not continue. Task only starts when connecting device to power supply and it starts charging. From user perspective it looks like download simply doesn't work when device is disconnected from power.
I need to complete all downloads in the background.
How to resolve this?
If I set Discretionary mode off and qualityOfService = .userInteraction for large downlioad tasks like movies and TV series, could Apple reject the app?
I could perhaps warn users using notification and/or suspend downloads when battery drops below certain level (20% or 50%) or whatever clients and/or Apple define as requirement.
Could I perhaps get an official statement from Apple?