---
title: allowAirPlay
framework: avfaudio
role: symbol
role_heading: Type Property
path: avfaudio/avaudiosession/categoryoptions-swift.struct/allowairplay
---

# allowAirPlay

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

## Declaration

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

## Discussion

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. For most other audio session categories, the system sets this option implicitly. Audio sessions using the multiRoute or record categories implicitly clear this option.

## See Also

### Category options

- [allowBluetooth](avfaudio/avaudiosession/categoryoptions-swift.struct/allowbluetooth.md)
- [allowBluetoothA2DP](avfaudio/avaudiosession/categoryoptions-swift.struct/allowbluetootha2dp.md)
- [allowBluetoothHFP](avfaudio/avaudiosession/categoryoptions-swift.struct/allowbluetoothhfp.md)
- [bluetoothHighQualityRecording](avfaudio/avaudiosession/categoryoptions-swift.struct/bluetoothhighqualityrecording.md)
- [defaultToSpeaker](avfaudio/avaudiosession/categoryoptions-swift.struct/defaulttospeaker.md)
- [duckOthers](avfaudio/avaudiosession/categoryoptions-swift.struct/duckothers.md)
- [farFieldInput](avfaudio/avaudiosession/categoryoptions-swift.struct/farfieldinput.md)
- [interruptSpokenAudioAndMixWithOthers](avfaudio/avaudiosession/categoryoptions-swift.struct/interruptspokenaudioandmixwithothers.md)
- [mixWithOthers](avfaudio/avaudiosession/categoryoptions-swift.struct/mixwithothers.md)
- [overrideMutedMicrophoneInterruption](avfaudio/avaudiosession/categoryoptions-swift.struct/overridemutedmicrophoneinterruption.md)
