<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCController/DidDisconnectMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Game Controller",
      "GameController"
    ],
    "preciseIdentifier" : "s:So12GCControllerC14GameControllerE20DidDisconnectMessageV"
  },
  "title" : "GCController.DidDisconnectMessage"
}
-->

# GCController.DidDisconnectMessage

A message that posts after a game controller accessory disconnects from
the device.

```
struct DidDisconnectMessage
```

## Overview

Use the `.didDisconnect` identifier with `NotificationCenter` to listen
for this message.

```
let observation = NotificationCenter.default.addObserver(of: GCController.self, for: .didDisconnect) { message in
   let controller = message.controller
}
```

## Topics

### Initializers

[`init(controller: GCController)`](/documentation/GameController/GCController/DidDisconnectMessage/init(controller:))

### Instance Properties

[`var controller: GCController`](/documentation/GameController/GCController/DidDisconnectMessage/controller)

The controller object that disconnected from the device.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`MainActorMessage`](/documentation/Foundation/NotificationCenter/MainActorMessage)

---

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)