We're building offline Fairplay playback feature in our app using AVAssetDownloadTask API set. We can successfully download the the content, but we noticed network activities, which are requests to the m3u8 playlists presented in the boot.xml in the movpkg package, when playing the downloaded content.
The problem is to load those m3u8 playlists requires cookies and the cookies are set to expire in 1 day, which leads to playback failure when the cookies expired. My question is why playing downloaded content needs to load those playlists? Isn't it supposed to play downloaded content without network?
Thanks.
Make sure that you only have one instance of AVURLAsset pointing to your downloaded asset. When there are multiple AVURLAssets pointing to the same .movpkg, sometimes AVPlayerItem falls back to network playback.
Note that Apple said they improved this in iOS 14.2: https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-14_2-release-notes: