iOS27 Callkit's didActivateAudioSession not being called sometimes

I have not seen any issues with didActivateAudioSession not getting called by iOS in many many years with many thousands of devices.

However with iOS27 beta code I have seen a few times that when making an outgoing call it never gets called.

All subsequent outgoing calls fail until I dismiss and relaunch the App.

Thank you for the post, when you said iOS 27, what beta are you using at this time? You had the same issue in iOS 14 a few years ago? https://developer.apple.com/forums/thread/711956

To prevent the user from having to force-quit the app, you should implement a timeout mechanism however you are correct CallKit expects the audio session to activate shortly after you fulfill the CXStartCallAction.

https://developer.apple.com/documentation/callkit/cxproviderdelegate/provider(_:didactivate:)?language=objc

May I ask you when that delegate is not trigger, can you request on that device a sysdiagnose press and hold both Volume buttons + Power button for 1-1.5 seconds until you feel a short vibration. Wait a few minutes for the sysdiagnose to compile. Let's see why CXProviderDelegate.provider(_:didActivateAudioSession:) is failing to fire on outgoing calls, wedging the CXProvider. Include the exact timestamp of the failed call and the UUID of the call if you have it logged. Can you post it here to see the reason?

Depending on the reason I’ll ask you to file a bug as you said the same code was working before iOS 27 beta 3 that was released yesterday. Please make sure you test it with that version first.

Looking forward to your reply.

Albert  WWDR

Hi Albert

Many thanks for the reply. I really appreciate it.

The problem

I had installed iOS27 Beta2 on my iPhone and every so often over a few days I was making test calls.

Then one outgoing call failed and every subsequent call failed until I restarted the App.

This was alarming for me because I had never seen such a scenario before.

From my own debug log I could see that didActivateAudioSession had NOT been triggered by iOS.

I then tried to repeat the problem but nearly a week went by before it happened again.

So this is a random bug that I cannot repeat at will.

Is this a new know issue?

Have their been similar reports of this from other VoIP app developers with iOS27?

Has that area of the framework been modified in iOS27?

iOS27 Beta 3

I have installed this version on the iPhone yesterday. I am trying to repeat the problem but it hasn't happened again yet.

If it happens again I will try to get a logfile as you suggest. I wish I could repeat the problem easily but I cannot!

Timeout Mechanism?

You suggest that I use a timeout mechanism so as the App can recover from the lockup.

What should that mechanism do?

For example if didActivateAudioSession does not happen after 10 seconds then what should I do?

Do I need to kill my CXProviderDelegate object and create a new one? Do I need to recreate my Audio Chain?

Historical problems

Back in Oct 2016 (!!) there was a thread for a similar issue https://developer.apple.com/forums/thread/64544?answerId=191868022#191868022

They were "one off failures" rather than the App completely failing for every subsequent call which is what I see now.

Apple's Stuart Montgomery mentioned it was reported in Radar # 28774388 and suggested workarounds at that time.

At that time I found that if I "configureAudioSession" in the completion block of a successful theMDSCXProvider reportNewIncomingCallWithUUID:theUUID update:theCallUpdate completion

then I got no failures of didActivateAudioSession. My code has been like that for 10 years working well with thousands of users. But now I think iOS27 has broken something!!

Thanks for your help

Many Thanks

Dave

@davemaj

Thanks for the detailed follow-up and the historical context.

Any reports of didActivateAudioSession failing to fire are taken seriously. Getting a sysdiagnose from Beta 3 to see if there is an issue can be extremely important.

You should not kill or recreate your CXProviderDelegate object. If didActivateAudioSession does not fire after a reasonable timeout, the goal of the timeout mechanism is to gracefully fail the stuck call so the CallKit state machine resets, allowing subsequent calls to succeed.

Do you have a simple focused project to see the behaviors and you can trigger a sysdiagnose immediately before restarting the app, and attach it to your Feedback report? If you can file a report with all that information, project and sysdiagnose the engineering team will be very happy to take a look to see if there is new regression bug there.

Really appreciate your help.

Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

Albert  WWDR

Hi Albert

It has now happened on iOS27 Beta3. I am running on an iPhone 12.

I am based in Dublin Ireland. So the local time is UTC+1

All times below are "Local"

17:04 Made outgoing call. Successful!

17:55 Made outgoing call. Successful

18:08 Made outgoing call. ActivateAudioSession did not occur so I had no path

I straight away tried to get a sysdiagnose file. I tried to add here as an attachment but it would not attach (Too big maybe!?) so I have added a link to my google drive where I uploaded it

https://drive.google.com/file/d/1yUINaVSzD-OjeYGKoM_vgmANP76yNVGG/view?usp=share_link

Further info (In case relevant)

I then waited till 18:56 and made another outgoing call. But that too has no path

I then made an incoming call at 18:58 and answered the call. In that case I did get a call path !!! So that seemed to kick it out of the locked up state?!

Note?: Unfortunately I cannot repeat this "at will". So I just keep making test calls every so often to try get it to happen.

Thanks @davemaj for your help on this.

If you can't attach the file here because is too large or for privacy concerns

you can to submit a code-level support request so we can discuss this further privately. When you create the request, indicate that you were referred by Albert Pascual at Apple and make sure to include a link to this thread.

Or maybe better because you were able to reproduce it, we can also move to file a bug and you can attach the sysdiagnose there.

Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

But if you want a code level support if you are not sure is an issue, we can start with a code-level support. Your call! But let me know the direction you decide to go.

Albert  WWDR

Thanks Albert

Before I do that .. Just to check....because it seems to only happen for me on beta software is it allowed to actually file a code level support? (Because it's Beta)??

Also just to say you should be able to get the sysdiagnose from the link above.

Thanks

Dave

Dave, maybe better file a bug for that at https://developer.apple.com/forums/thread/712889

Make sure to post the FB number here.

Thanks,

Albert  WWDR

Hi Albert

I will get around to filing the formal bug soon. I'm currently moving to a new MacBook so I've been offline.

However I just had a quick look at the sysdiagnose file that I linked in previous post.

I can see other successful calls preceding the failed call.

The error in log seems to be

error 2026-07-09 18:08:10.408839 +0100 callservicesd SessionCore_Create.mm:92 AudioSession creation failed with an error: <NSError:0x7ccf812160(NSOSStatusErrorDomain:2003329396) - { NSLocalizedDescription = "Session creation failed in server"; }>

Maybe that might be of help?

Thanks

Dave

Thanks so much for the error message, yet the sysdiagnose is great.

I had to look it up a little bit, I can be wrong as I'm not an audio engineers but it seems like the audio recording isn’t starting right when you begin a transmission through the System UI. This might be because the system isn’t properly starting the audio process. So are you using the audio for anything else? Do you have a a simple focused sample showing this issue for any chance?

Definitely an interesting error that will be great to take a look at.

Let me know when you file the bug. Thanks

Albert  WWDR

Hi Albert i have filed the bug

FB23709940

Thanks

Dave

Thank you for doing that Dave. The bug was routed to the correct team and they are reviewing it right now. Thanks!!

You can see the status of your feedback in Feedback Assistant. There, you can track if the report is still being investigated, has a potential identifiable fix, or has been resolved in another way. The status appears beside the label "Resolution." We're unable to share any updates on specific reports on the forums.

For more details on when you'll see updates to your report, please see What to expect after submission.

Albert  WWDR

This is still happening on iOS27 Beta 4. My very first call after iOS27 beta4 installation failed. I cannot repeat it since.

Also a colleague of mine has now seen the same issue.

I have not received any feedback to my FB.

@davemaj Thanks for the post. I know some teams are not very chatty on their bugs, I assure you that is being treated as a bug and they'll let you know when has been fixed.

Albert  WWDR

iOS27 Callkit's didActivateAudioSession not being called sometimes
 
 
Q