CallKit - No Audio on Incoming Calls and locked devices

Our VoIP app uses CallKit and is currently affected by a strange iOS 13 bug on incoming calls when the device is locked. After initializing the AudioSession I get tons of the following error message while trying to access speaker and microphone:


[aurioc] 1590: AUIOClient_StartIO failed


Before accessing speaker and microphone I initialize my audiosession in:


func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
  ...
  let session = AVAudioSession.sharedInstance()
  try? session.setCategory(.playAndRecord, mode: .voiceChat, policy: .default, options: .allowBluetooth)
  ...
}


and wait until the folloing function gets called by callkit:


func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) {
   ..
}


This should ensure that the AudioSession is completely intialized. But it doesn't work, I get no audio and the described error message.


All incoming calls are working perfectly on iOS12 or earlier and they also work when the iOS 13 device is unlocked. So this problem only occurs on locked iOS 13 devices when getting an incoming call via callkit.


WhatsApp audio calls seems to have the same problem. They also don't work on locked iOS 13 Beta devices.


It seems like an iOS 13 Beta bug. I can provide you with additional informations, if you need.

Replies

Yes I have seen the same audio issue with iOS13Beta3. I posted it here a few days ago


https://forums.developer.apple.com/thread/119280


Also If the call arrives if the iPhone is unlocked then when I answer the call I do get Audio. However I get a blank screen rather than seeing the "phone" screen with Mute, Speaker, Keypad buttons etc. I just see a blank screen (Wallpaper with no icons). If I swipe up then I see all of the icons and if I select my App it opens on my own Incall screen. Do you see this too?

I have the same issue with the blank screen. Your thread exactly describes my problem as well. Let‘s hope that this bug will get fixed soon :-/

I have same issue as well on iOS 12.4, when app run in background


Error message:

2019-07-25 14:51:33.423349-0400 My App[1500:168419] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.430647-0400 My App[1500:168419] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.433213-0400 My App[1500:168419] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.433410-0400 My App[1500:168419] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.433842-0400 My App[1500:168419] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.434904-0400 My App[1500:168419] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.435270-0400 My App[1500:168419] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.446057-0400 My App[1500:167992] -[ChannelManager channelChanged:] [Line 250] AVAudioSessionRouteChangeReasonCategoryChange:  and (ThreadID:  0x280461040)
2019-07-25 14:51:33.479113-0400 My App[1500:167992] -[ChannelManager channelChanged:] [Line 271] new Audio Channel <AVAudioSessionPortDescription: 0x281e21f50, type = Receiver; name = Receiver; UID = Built-In Receiver; selectedDataSource = (null)>:  and (ThreadID:  0x280461040)
2019-07-25 14:51:33.482078-0400 My App[1500:167850] AudioOutputUnitStart - begin:  and (ThreadID:  0x280931340)
2019-07-25 14:51:33.977932-0400 My App[1500:167979] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.978930-0400 My App[1500:167979] [MediaRemote] OutputDeviceUID is nil iPhone: (null)
2019-07-25 14:51:33.979655-0400 My App[1500:167979] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.980082-0400 My App[1500:167979] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:33.981183-0400 My App[1500:167979] [MediaRemote] OutputDeviceUID is nil iPhone: (null)
2019-07-25 14:51:33.981634-0400 My App[1500:167979] [MediaRemote] OutputDeviceUID is nil iPhone: (null)
2019-07-25 14:51:33.983075-0400 My App[1500:167979] [MediaRemote] OutputDeviceUID is nil iPhone: (null)
2019-07-25 14:51:33.997096-0400 My App[1500:167992] -[ChannelManager channelChanged:] [Line 262] Default?????:  and (ThreadID:  0x280461040)
2019-07-25 14:51:34.073539-0400 My App[1500:167992] -[ChannelManager channelChanged:] [Line 271] new Audio Channel <AVAudioSessionPortDescription: 0x281e22010, type = Receiver; name = Receiver; UID = Built-In Receiver; selectedDataSource = (null)>:  and (ThreadID:  0x280461040)
2019-07-25 14:51:34.077150-0400 My App[1500:167979] [MediaRemote] OutputDeviceUID is nil Speaker: (null)
2019-07-25 14:51:34.163559-0400 My App[1500:167850] [aurioc] 1540: AUIOClient_StartIO failed (561145187)

I have same issue when access microphone by bluetooth or earphone in background on iOS 12.4, iOS 13.0 devices


[aurioc] 1540: AUIOClient_StartIO failed (561145187)

I'm facing the same problem in our apps where audio interruption in background causes the later audio session reactivation and/or audio engine restart to fail when the app is still in the backround.


Report to Apple as FB6662779, as of today I have received from Apple:


Recent Similar Reports:Less than 10

Resolution:Potential fix identified - For a future OS update

Has anybody hear back an ETA for the fix? This seems like a big issue given that many apps like whatsapp, zoom, etc... rely in access to these features while in the background.

I am facing the same issue. Has anybody hear back an ETA for the fix?

Hi, did you find a solution?

Hello , i am having the same issue on ios 16