<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AccessoryAccess",
  "identifier" : "/documentation/AccessoryAccess/AAUSBAccessory/init(xpcRepresentation:)-6dmbu",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accessory Access"
    ],
    "preciseIdentifier" : "c:objc(cs)AAUSBAccessory(im)initWithXPCRepresentation:"
  },
  "title" : "init(xpcRepresentation:)"
}
-->

# init(xpcRepresentation:)

Creates a USB accessory from an XPC representation.

```
init?(xpcRepresentation: xpc_object_t)
```

## Parameters

`xpcRepresentation`

The XPC representation of an `AAUSBAccessory` object received from the XPC.

## Return Value

An `AAUSBAccessory` object if the framework decoded the provided `xpc_object_t`, or `nil` if it’s invalid.

---

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)