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

# createXPCRepresentation()

Creates an encoded representation of the USB accessory.

```
func createXPCRepresentation() -> xpc_object_t
```

## Discussion

A USB accessory can be encoded to <doc://com.apple.documentation/documentation/XPC/xpc_object_t>, and passed to an XPC service over an XPC connection.

---

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)