Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deal with this error AVAudioSessionErrorCodeMissingEntitlement?

I'm trying to integrate with iOS10's CallKit, however when I'm trying to initialize the audio session after accept a phone call, this "AudioUnitInitialize" API will throw out this error "AVAudioSessionErrorCodeMissingEntitlement". According to the document, it's just one line explanation: https://developer.apple.com/reference/avfoundation/avaudiosessionerrorcode/avaudiosessionerrorcodemissingentitlement

How should I update the entitlement for support this? Does any body has any experience?

like image 824
Pei Avatar asked Jun 29 '16 22:06

Pei


1 Answers

I also ran into this issue in iOS10 Beta 6, and was able to resolve it by moving the "AudioUnitInitialize" API from the performAnswerCallAction: method (as implemented in SpeakerBox) to the init routine of the ProviderDelegate.

By moving initialization earlier in the lifecycle of the ProviderDelegate, somehow the 'entitlement' problem is avoided.

like image 58
Tico Ballagas Avatar answered Sep 18 '22 12:09

Tico Ballagas