<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AccessoryAccess",
  "identifier" : "/documentation/AccessoryAccess/AAUSBAccessoryListener",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Accessory Access"
    ],
    "preciseIdentifier" : "c:objc(pl)AAUSBAccessoryListener"
  },
  "title" : "AAUSBAccessoryListener"
}
-->

# AAUSBAccessoryListener

A class that conforms to the framework’s USB accessory listener protocol can listen to the accessory events.

```
protocol AAUSBAccessoryListener : NSObjectProtocol, Sendable
```

## Discussion

This protocol provides methods that notify your app when a USB accessory connects to or disconnects from the system.  The framework invokes the methods for a listener on the internal serial queue of [`AAUSBAccessoryManager`](/documentation/AccessoryAccess/AAUSBAccessoryManager).

## Topics

### Protocol methods

[`func usbAccessoryDidConnect(AAUSBAccessory)`](/documentation/AccessoryAccess/AAUSBAccessoryListener/usbAccessoryDidConnect(_:))

The method the framework invokes when a USB accessory connects to the system.

[`func usbAccessoryDidDisconnect(AAUSBAccessory)`](/documentation/AccessoryAccess/AAUSBAccessoryListener/usbAccessoryDidDisconnect(_:))

The method the framework invokes when a USB accessory disconnects from the system.

## Relationships

### Inherits From

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)