Share audio is not working with Azurecommunicationcalling iOS SDK

Payal Tiwari 60 Reputation points
2025-04-21T09:43:54.87+00:00

I am able to share screen with ACS Properly with Broadcast extension , Whenever I m going to share audio I m getting error :- Error Domain=ACSCallingShared Code=1 "Failed" UserInfo={NSLocalizedDescription=Failed}

Is Audio sharing possible in iOS using Azure Communication Services (ACS) Join Room functionality?

I am working on implementing screen sharing with audio in an iOS app using Azure Communication Services (ACS) Join Room functionality.

I want to know if screen sharing with audio is supported and how it can be achieved. Since iOS does not allow direct access to screen content, I am considering the following approach:

  1. Use a Broadcast Upload Extension to capture screen frames.
  2. Transfer frames to the main app using App Groups or Darwin Notifications.

Any guidance or sample code would be greatly appreciated!

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,129 questions
{count} votes

Accepted answer
  1. Sampath 2,345 Reputation points Microsoft External Staff
    2025-04-29T14:43:52.3866667+00:00

    Hello @Payal Tiwari,

    I’m sharing this detailed answer not only to help with your case but also for the benefit of the community, in case someone else faces a similar issue when working with Azure Communication Services (ACS) on iOS.

    Thank you so much for your patience and all the efforts you put into testing and sharing updates. After reviewing everything carefully, I can confirm that audio sharing along with screen sharing is possible on iOS with ACS, but with some important limitations. Using a Broadcast Upload Extension, you are able to capture screen frames and pass them back to your main app using App Groups. As you also discovered, it is possible to capture audio, but iOS itself does not allow apps to capture full system sounds (like music from another app or device sounds) unless private APIs are used. This is part of Apple’s security design and is explained in their ReplayKit documentation.

    On the Azure side, ACS supports working with custom audio and video streams through raw media access, as explained in the Azure Communication Services Raw Media Access Overview. You were able to fix the original error by adjusting the audio format to match what ACS expects — PCM 16-bit, mono or stereo, with a sample rate of either 16kHz or 48kHz — and after that, the audio started sending successfully.

    Regarding the audio glitches you noticed on the receiver side, this is something that can happen when sending raw audio over the network. To improve it, you can add a buffer to smooth out the audio and handle small network issues like jitter or packet loss. Microsoft’s iOS Raw Media Quickstart can help you set up raw media handling properly on the receiving side.

    About AVAudioEngine, while it is a good tool for resampling audio if needed, your current method capturing audio in the Broadcast Extension and sending it to the app is completely fine. Since you got it working without needing AVAudioEngine, there is no need to change unless you face resampling issues later.

    Hope it helps!

    Please do not forget to click "Accept the answer” and yes wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.