<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioSession/deactivate(options:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioSession(im)deactivateWithOptions:completionHandler:"
  },
  "title" : "deactivate(options:completionHandler:)"
}
-->

# deactivate(options:completionHandler:)

Deactivates the audio session asynchronously.

```
func deactivate(options: AVAudioSessionDeactivationOptions = [], completionHandler handler: @escaping @Sendable (Bool, (any Error)?) -> Void)
```

```
func deactivate(options: AVAudioSessionDeactivationOptions = []) async throws -> Bool
```

## Parameters

`options`

Deactivation options.

`handler`

A completion handler called with a success flag and an error if deactivation failed.

## Discussion

This method returns immediately without blocking the calling thread. The system calls the completion handler with the result.

---

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)