<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIScene/getDefaultAudioSession(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIScene(im)getDefaultAudioSessionWithCompletionHandler:"
  },
  "title" : "getDefaultAudioSession(completionHandler:)"
}
-->

# getDefaultAudioSession(completionHandler:)

Retrieves the audio session that contains all sounds that implicitly belong to this scene.

```
nonisolated func getDefaultAudioSession(completionHandler handler: @escaping @Sendable (AVAudioSession?) -> Void)
```

```
nonisolated var defaultAudioSession: AVAudioSession? { get async }
```

## Discussion

In visionOS, the default <doc://com.apple.documentation/documentation/AVFAudio/AVAudioSession> for a [`UIScene`](/documentation/UIKit/UIScene) contains all of the RealityKit sounds from any <doc://com.apple.documentation/documentation/RealityKit/RealityView> in the scene’s view hierarchy.

The default audio session’s initial configuration is mixable, with <doc://com.apple.documentation/documentation/AVFAudio/AVAudioSession/isNowPlayingCandidate> set to <doc://com.apple.documentation/documentation/Swift/false>. This configuration ensures that the scene’s default audio session doesn’t interfere with existing behavior of the app’s primary audio session, <doc://com.apple.documentation/documentation/AVFAudio/AVAudioSession/sharedInstance()>. However, you can modify the default audio session’s properties as needed.

You can safely call this method on a non-main thread. It’s recommended to get a scene’s default audio session from a non-main thread to avoid calling resource-intensive <doc://com.apple.documentation/documentation/AVFAudio/AVAudioSession> interfaces from the main thread, which can have a negative impact on the responsiveness of the user experience.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)