<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioSession/CategoryOptions-swift.struct/allowAirPlay",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:@E@AVAudioSessionCategoryOptions@AVAudioSessionCategoryOptionAllowAirPlay"
  },
  "title" : "allowAirPlay"
}
-->

# allowAirPlay

An option that determines whether you can stream audio from this session to AirPlay devices.

```
static var allowAirPlay: AVAudioSession.CategoryOptions { get }
```

## Discussion

Setting this option enables the audio session to route audio output to AirPlay devices. You can only explicitly set this option if the audio session’s category is set to [`playAndRecord`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/playAndRecord). For most other audio session categories, the system sets this option implicitly.

Audio sessions using the [`multiRoute`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/multiRoute) or [`record`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/record) categories implicitly clear this option.

---

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)