Best practices
These recommendations help you ship a reliable audio experience with the Video SDK for iOS.
Permissions
The SDK cannot capture from the microphone until the user has granted microphone access. Add an NSMicrophoneUsageDescription entry to your Info.plist and request permission before you call startAudio.
- Request microphone access at the moment the user takes an action that needs audio (such as tapping a "Join audio" button), not at app launch. The prompt feels justified when it's tied to a clear action.
- If the user denies access, surface a clear message and a path to retry. For example, open
UIApplication.openSettingsURLStringso they can grant the permission in Settings. - If you also need video, add an
NSCameraUsageDescriptionentry and request camera access at the same time.
See Requesting authorization to capture and save media for the iOS permission flow.
Enable audio with a clear action
Tie the call to startAudio to a visible, user-initiated action like a "Join audio" or microphone button. This makes it easy for users to understand when they're connected to session audio and matches what they expect from native calling apps.
Show mute and talking status
- Render each user's mute state from their
ZoomVideoSDKAudioStatusso participants can see at a glance who is muted. ImplementonUserAudioStatusChangedand re-render when it fires. - Animate the microphone icon while a user is talking. Use the
onUserActiveAudioChangedcallback together withaudioStatus.talkingto drive the animation. This gives users confirmation that their mic is capturing their voice. - Highlight the active speaker in your video grid, for example by bordering their tile, so participants can see who is currently speaking.
Audio routing
On iOS, audio routing between the receiver, speaker, and connected headsets or Bluetooth devices is managed by the system through AVAudioSession.
- Configure an appropriate category (such as
.playAndRecord) and route as part of your app's audio session setup. - Observe
AVAudioSession.routeChangeNotificationso you can update the UI when the user connects or disconnects a headset mid-call.
Handle host-ask-unmute on the client
When the host calls unmuteAudio on a remote user, the target device receives onHostAskUnmute. Always show the user a confirmation prompt, never silently turn on their microphone. Calling unmuteAudio on the local user without the user's explicit acknowledgment violates the user's expectation of mic privacy.
Lifecycle
- The SDK keeps audio running while your app is backgrounded, so you typically should not call
stopAudiowhen the app moves to the background. Only stop audio when the user explicitly leaves the session. - To keep capturing audio in the background, enable the Audio, AirPlay, and Picture in Picture background mode in your target's capabilities.
- Keep audio-related state in your view model so view reloads don't tear down your audio UI.
Sound options
Leave original sound disabled unless your use case specifically needs unprocessed audio. The SDK's default audio processing (echo cancellation, noise suppression) produces a better experience for general voice communication. Enable original sound for music, broadcasting, or other content where the SDK's processing would degrade the source.
Permission changes mid-session
If the user disables the microphone permission while a session is running, audio capture silently stops. Re-check microphone authorization when your app returns to the foreground and surface a clear message asking the user to re-grant the permission and rejoin audio.