title: Playing Offline HLS with AES-128 encryption iOS
body: <p>I want to integrate offline HLS in iOS through <code>AVFoundation</code>.
  I have an encrypted HLS with simple AES-128 and it doesn't want to play in offline mode, I was trying to integrate <code>AVAssetResourceLoaderDelegate</code>, but don't know how to integrate <code>applicationCertificate</code> and <code>contentKeyFromKeyServerModuleWithSPCData</code> that are in  <a href="https://developer.apple.com/streaming/fps/" rel="nofollow noreferrer">https://developer.apple.com/streaming/fps/</a> examples. I have a feeling that I am doing something wrong. It is a sample <code>AES-128 encryption</code>, not even <code>DRM</code>.</p>
  <p>Without the internet, <code>AVPlayer</code> is still trying to get <code>encryption key</code> through <code>GET</code> request.
  It would be great if someone succeeded to save the encrypted key locally and somehow gave it to <code>AVPlayer</code> together with <code>AVURLAsset</code>.</p>
  <p>Did someone manage to integrate this?</p>