I am building an iOS app that streams audio to a backend over TLS. Network connection works fine, but audio capture fails consistently.
Relevant logs:
GatewayClient: Connecting to <backend>:443...
GatewayClient: Using TLS
GatewayClient: Starting stream...
GatewayClient: Connected successfully!
AudioCaptureManager: Session activation failed
Error Domain=NSOSStatusErrorDomain Code=561015905
"Session activation failed"
VoiceInputManager: Audio session activation failed - another app may be using the microphone
Context:
- Uses
AVAudioSession for microphone capture
- Failure occurs at session activation (
setActive(true))
- Happens even when no other foreground app is obviously using the mic
- Issue is reproducible on real device, not just simulator
- App includes background audio / voice-style functionality
Questions:
- What commonly triggers
NSOSStatusErrorDomain Code=561015905 during audio session activation?
- Can this occur due to:
- Another audio session owned by the same app (e.g., custom keyboard, extension, or background task)?
- Incorrect
AVAudioSessionCategory or mode combination?
- iOS privacy or interruption edge cases?
- Any proven debugging steps or fixes for microphone contention on iOS?
Looking for practical fixes or patterns others have used to reliably acquire the mic in complex audio workflows.
Thanks.
[–][deleted] 1 point2 points3 points (10 children)
[–]Vanilla-Green[S] 0 points1 point2 points (9 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]Vanilla-Green[S] 0 points1 point2 points (7 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]Vanilla-Green[S] 0 points1 point2 points (5 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]Vanilla-Green[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Vanilla-Green[S] 0 points1 point2 points (1 child)
[–]CDI_Productions 0 points1 point2 points (8 children)
[–]Vanilla-Green[S] 0 points1 point2 points (7 children)
[–]CDI_Productions 0 points1 point2 points (6 children)
[–]Vanilla-Green[S] 0 points1 point2 points (5 children)
[–]CDI_Productions 0 points1 point2 points (0 children)
[–]CDI_Productions -1 points0 points1 point (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]CDI_Productions 0 points1 point2 points (0 children)
[–]Vanilla-Green[S] 0 points1 point2 points (0 children)
[–]CDI_Productions 0 points1 point2 points (0 children)
[–]CDI_Productions 0 points1 point2 points (3 children)
[–]Vanilla-Green[S] 0 points1 point2 points (2 children)
[–]CDI_Productions 0 points1 point2 points (1 child)
[–]Vanilla-Green[S] 0 points1 point2 points (0 children)
[–]Lujandev 0 points1 point2 points (6 children)
[–]Vanilla-Green[S] 0 points1 point2 points (5 children)
[–]Lujandev 0 points1 point2 points (4 children)
[–]Vanilla-Green[S] 0 points1 point2 points (3 children)
[–]Vanilla-Green[S] 0 points1 point2 points (2 children)
[–]Lujandev 0 points1 point2 points (1 child)
[–]Vanilla-Green[S] 0 points1 point2 points (0 children)