Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVContentKeySessionDelegate methods not called on iOS 16

I have an app that is in store for few years. It downloads DRM content for offline usage and handles persistable keys via AVContentKeySessionDelegate. Everything worked until iOS 16. Now it works only in 1 session out of 20. In the rest of sessions AVContentKeySession do not ask for a key and no methods of AVContentKeySessionDelegate is called.

I have tried same code also on another device with iOS 12.4 and everything works just fine. The bug is related only to iOS 16.

DRM online content is streaming correctly. This bug is related only to downloading AV asset.

like image 547
Jindřich Skeldal Avatar asked Dec 18 '25 15:12

Jindřich Skeldal


1 Answers

So only solution I found was to recreate AVContentKeySession.

AVContentKeySession caches keys for content. If it receives online content key then in most cases it does not ask for key when you download the asset for offline. Calling for process content key helps only when you download for the first time. When you download, delete and download again, tou have to use newly created AVContentKeySession.

like image 103
Jindřich Skeldal Avatar answered Dec 21 '25 06:12

Jindřich Skeldal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!