Thanks - this helped, somewhat, but I'm still having problems with AirPlay. I put in the usesExternalPlaybackWhileExternalScreenIsActive, and now I'm seeing the initial request from (presumably) the Apple TV. But, I'm getting an error in gnerating the actual SPC.
Note that this all works when I'm not playing through AirPlay (ie. when I'm playing local on the device).
Specifically, the error happens in my delegate code during the call to shouldWaitForLoadingOfRequestedResource:
NSData *requestBytes = nil;
requestBytes = [loadingRequest streamingContentKeyRequestDataForApp:[NSData dataWithBytes:(const void*)certificate.Data() length:certificate.Size()] contentIdentifier:urlParams options:nil error:&error];
if(requestBytes == nil) {
NSLog(@"Error creating server request: "%@", error);
return FALSE;
}
The error I see is similar to what I used to see when I did not have a valid certificate:
<Warning>: Error creating server request: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x190a83f0 {Error Domain=NSOSStatusErrorDomain Code=-6753 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (-6753)}
Any idea where I'm going wrong from there? Again this all works fine if AirPlay is not involved.
Thanks!