<!--
{
  "availability" : [
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioSession/setIntendedSpatialExperience:options:error:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioSession(im)setIntendedSpatialExperience:options:error:"
  },
  "title" : "setIntendedSpatialExperience:options:error:"
}
-->

# setIntendedSpatialExperience:options:error:

Sets the spatial audio experience your app intends to provide the user.

```
- (BOOL) setIntendedSpatialExperience:(AVAudioSessionSpatialExperience) intendedSpatialExperience options:(NSDictionary<NSString *,id> *) options error:(NSError **) error;
```

## Parameters

`intendedSpatialExperience`

The spatial audio experience to set.

`options`

A dictionary of options that customize the experience.

`error`

If an error occurs, an object that provides the details of the error.

## Topics

### Spatial experience options

[`extern AVAudioSessionSpatialExperienceOption AVAudioSessionSpatialExperienceOptionAnchoringStrategy;`](/documentation/AVFAudio/AVAudioSessionSpatialExperienceOptionAnchoringStrategy)

An option that sets where the audio anchors in a head-tracked spatial experience.

[`extern AVAudioSessionSpatialExperienceOption AVAudioSessionSpatialExperienceOptionSceneIdentifier;`](/documentation/AVFAudio/AVAudioSessionSpatialExperienceOptionSceneIdentifier)

An option that identifies the scene the audio anchors to.

[`extern AVAudioSessionSpatialExperienceOption AVAudioSessionSpatialExperienceOptionSoundStageSize;`](/documentation/AVFAudio/AVAudioSessionSpatialExperienceOptionSoundStageSize)

An option that sets how large the sound stage is in a spatial experience.

[`typedef NSString * const AVAudioSessionSpatialExperienceOption;`](/documentation/AVFAudio/AVAudioSessionSpatialExperienceOption)

A key that configures one characteristic of a spatial experience, such as its sound stage size or anchoring.



---

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)