<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/XPCReceivedMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC18XPCReceivedMessageV"
  },
  "title" : "XPCReceivedMessage"
}
-->

# XPCReceivedMessage

A type that represents a message sent between a session and a listener.

```
struct XPCReceivedMessage
```

## Topics

### Accessing message content

[`func decode<T>(as: T.Type) throws -> T`](/documentation/XPC/XPCReceivedMessage/decode(as:))

Decodes a message as the given type.

[`var isSync: Bool`](/documentation/XPC/XPCReceivedMessage/isSync)

A Boolean value that indicates if this message is from a synchronous request.

### Replying to messages

[`var expectsReply: Bool`](/documentation/XPC/XPCReceivedMessage/expectsReply)

A Boolean value that indicates if the client that sent the message expects a reply.

[`func reply<Message>(Message)`](/documentation/XPC/XPCReceivedMessage/reply(_:))

Sends a reply to the originator of the message.

[`func handoffReply(to: DispatchQueue, () -> Void) -> (any Encodable)?`](/documentation/XPC/XPCReceivedMessage/handoffReply(to:_:))

Informs the system when message processing and response continues in a separate dispatch queue.

### Instance Methods

[`func senderSatisfies(XPCPeerRequirement) -> Bool`](/documentation/XPC/XPCReceivedMessage/senderSatisfies(_:))

Check whether the sender of the received message satisfies the specified requirement.

---

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)