Environment
- Device: Apple Vision Pro (real device)
- OS: visionOS 26.5
- Xcode: 26.5
- Framework: AVFAudio / AVFoundation
Summary
On visionOS 26.5, tapping an empty Button consistently emits the following internal warning before the action closure executes:
<<<< FigAudioSession(AV) >>>> signalled err=-19224 (<>:612)
After this warning is emitted, any subsequent call to configure AVAudioSession silently stops working — audio input and output become non-functional for the lifetime of the session.
If the same configuration is performed without a preceding button tap (e.g., inside View.task {}), it succeeds and audio works correctly.
Reproduction
Due to a dependency on LiveKitWebRTC (livekit/webrtc-xcframework) for WebRTC-based Realtime API audio, we are unable to provide a full self-contained sample project. However, the AVAudioSession configuration code involved is as follows:
static func configureAudioSession() {
#if !os(macOS)
do {
let audioSession = AVAudioSession.sharedInstance()
#if os(tvOS)
try audioSession.setCategory(.playAndRecord, options: [])
#else
try audioSession.setCategory(.playAndRecord, options: [.defaultToSpeaker])
#endif
try audioSession.setMode(.videoChat)
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
} catch {
print("Failed to configure AVAudioSession: \(error)")
}
#endif
}
Scenario A — Button tap (fails):
Button("Start") {
configureAudioSession() // FigAudioSession err=-19224 appears; audio stops working
}
Scenario B — View.task (succeeds):
.task {
configureAudioSession() // No warning; audio works correctly
}
The only difference is whether a user gesture (Button tap) precedes the call.
Observed Behavior
- Tapping any
Buttonon visionOS 26.5 causesFigAudioSession(AV) err=-19224to be signalled at<>:612, even before the action closure runs. - After this warning,
AVAudioSessionconfiguration appears to have no effect —setActive(true)does not throw, but audio appears to stop functioning. - Configuring the session prior to any button interaction (e.g., in
View.task {}) works correctly.
Expected Behavior
- A
Buttontap should not implicitly interfere with the audio session state. AVAudioSessionconfiguration should succeed regardless of the UI event context that triggers it.
Questions
-
What does
FigAudioSession(AV) err=-19224mean? Does it correspond to a documentedAVAudioSession.ErrorCode? -
Why does a Button tap trigger a
FigAudioSessionsignal on visionOS? Is the system performing implicit audio session management when detecting user interaction? -
Is there a recommended pattern for configuring
AVAudioSessionin response to a user gesture on visionOS? Our current workaround (View.task {}) is not suitable for on-demand audio start triggered by the user. -
Is
err=-19224causally responsible for the subsequent audio issue? SincesetActive(true)does not throw after the warning, it is unclear whether this signal is the direct cause of the apparent audio failure or a symptom of a deeper conflict. -
Are there UI components or APIs on visionOS that do not trigger this signal, while still being user-interaction driven?
Additional Notes
- Reproducible only on physical Apple Vision Pro hardware; not observed in Simulator.
- AirPlay mirroring is not in use during testing.
- No other apps are playing audio in the background at the time of reproduction.
- We use
LiveKitWebRTC(livekit/webrtc-xcframework, revision94ce1c9) for WebRTC audio. However, theFigAudioSessionwarning appears independently of the WebRTC layer — it is emitted on Button tap even beforeconfigureAudioSession()is called. - We have verified that calling
configureAudioSession()beforeperformHandshake()(i.e., before WebRTC initializes its audio pipeline) does not resolve the issue when a Button tap precedes the call.