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

# setAggregatedIOPreference(_:)

Sets the audio session’s aggregated I/O configuration preference.

```
func setAggregatedIOPreference(_ inIOType: AVAudioSession.IOType) throws
```

## Parameters

`inIOType`

The aggregated I/O preference that you want to use.

## Discussion

Starting with iOS 10, <doc://com.apple.documentation/documentation/AVFoundation/AVCaptureSession> has changed its default audio input configuration on iPhone and iPad devices that support the Live Photos feature. This change allows taking a Live Photo without interrupting background audio playback. Configure your preferred audio input behavior by setting your aggregated I/O preference.

Apps that use <doc://com.apple.documentation/documentation/AVFoundation/AVCaptureSession> in its default audio input configuration (<doc://com.apple.documentation/documentation/AVFoundation/AVCaptureSession/usesApplicationAudioSession> `=` <doc://com.apple.documentation/documentation/Swift/true>, <doc://com.apple.documentation/documentation/AVFoundation/AVCaptureSession/automaticallyConfiguresApplicationAudioSession> `=` <doc://com.apple.documentation/documentation/Swift/true>), and that need to guarantee the same behavior as previous versions of iOS, should opt-out of this new behavior by setting the aggregated I/O preference to [`AVAudioSession.IOType.aggregated`](/documentation/AVFAudio/AVAudioSession/IOType/aggregated).

Apps that don’t use <doc://com.apple.documentation/documentation/AVFoundation/AVCaptureSession>, or that use a capture session in its nondefault configuration, can ignore this preference. In these cases, there’s no change in behavior from previous versions of iOS.

---

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)