[FairPlay] Attack AVContentKey to CMSampleBuffer results in "NSLocalizedFailureReason=This app is not authorized to play this file"

I implemented an AVContentKeySessionDelegate that after calling processContentKeyRequest succeeds in producing a contentKey in the callback func contentKeySession(_: AVContentKeySession, didProvide _contentKey: AVContentKey) of the AVContentKeyRecipient that manages the decoding of CMSampleBuffers.

However, when I store the AVContentKey from the contentKeySession callback and try to attach it to the CMSampleBuffer with AVSampleBufferAttachContentKey, I get the error:

Error Domain=AVFoundationErrorDomain Code=-11836 "Cannot Open" UserInfo={NSLocalizedFailureReason=This app is not authorized to play this file., NSLocalizedDescription=Cannot Open, NSUnderlyingError=0x28303a220 {Error Domain=NSOSStatusErrorDomain Code=-12161 "(null)"}}

Does anyone have some insight on why this is happening and how to solve it?

Hello @YeltsaKcir. were you able to find some info about this?

[FairPlay] Attack AVContentKey to CMSampleBuffer results in "NSLocalizedFailureReason=This app is not authorized to play this file"
 
 
Q