lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
246 stars 17 forks source link

27674736: No audio on CallKit calls #15539

Open openradar-mirror opened 8 years ago

openradar-mirror commented 8 years ago

Description

Area: AVFoundation (Audio / Video)

Summary: A lot of times there is no audio when using CallKit because AudioUnitInitialize returns a AVAudioSessionErrorCodeMissingEntitlement error. Sometimes it works, sometimes it doesn't.

Steps to Reproduce:

  1. Report incoming call through CallKit (outgoing also fails), i.e., call reportNewIncomingCall method on CXProvider.
  2. Answer call.
  3. Method on provider delegate that notifies of a CXAnswerCallAction gets called.
  4. Audio session is configured, but AudioUnitInitialize fails with OSStatus equals to AVAudioSessionErrorCodeMissingEntitlement.
  5. Action is fulfilled or not, it doesn't matter.
  6. didActivateAudioSession method in the provider delegate is never called.
  7. No audio in the call.

Expected Results: I expect AudioUnitInitialize to not fail, and when the action is fulfilled the didActivateAudioSession method gets called and the audio in the call works correctly.

Actual Results: Since AudioUnitInitialize fails, it doesn't matter if the action is fulfilled or not, because the call will have no audio.

Version: iOS 10.0 Beta 4 [14A5322e]

Notes: This problem is visible in the Speakerbox example code:

https://developer.apple.com/library/prerelease/content/samplecode/Speakerbox

Configuration: iPhone 6s 16GB, using Wifi

Product Version: 10.0 Beta 4 Created: 2016-08-03T08:23:29.055700 Originated: 2016-08-03T00:00:00 Open Radar Link: http://www.openradar.me/27674736

ghost commented 7 years ago

Hello,

I had a similar issue, you can try to set up and activate the audioSession in the handler of *- (void)reportNewIncomingCallWithUUID:(NSUUID )UUID update:(CXCallUpdate )update completion:(void (^)(NSError _Nullable error))completion;**

This worked for me and I entered didActivateAudioSession everytime