---
title: NSXPCCoder
framework: foundation
role: symbol
role_heading: Class
path: foundation/nsxpccoder
---

# NSXPCCoder

A coder that encodes and decodes objects that your app sends over an XPC connection.

## Declaration

```swift
class NSXPCCoder
```

## Overview

Overview If you want to perform custom encoding or decoding of Codable objects that your app sends over an NSXPCConnection, use isKind(of:) to determine if the coder provided to your object is a kind of NSXPCCoder.

## Topics

### Inspecting the Coder

- [connection](foundation/nsxpccoder/connection.md)
- [userInfo](foundation/nsxpccoder/userinfo.md)

### Encoding and Decoding

- [encodeXPCObject(_:forKey:)](foundation/nsxpccoder/encodexpcobject(_:forkey:).md)
- [decodeXPCObject(ofType:forKey:)](foundation/nsxpccoder/decodexpcobject(oftype:forkey:).md)

## Relationships

### Inherits From

- [NSCoder](foundation/nscoder.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### XPC Client

- [NSXPCProxyCreating](foundation/nsxpcproxycreating.md)
- [NSXPCConnection](foundation/nsxpcconnection.md)
- [NSXPCInterface](foundation/nsxpcinterface.md)
