<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GroupActivities",
  "identifier" : "/documentation/GroupActivities/GroupSessionMessenger/send(_:to:completion:)-zufl",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Group Activities",
      "GroupActivities"
    ],
    "preciseIdentifier" : "s:15GroupActivities0A16SessionMessengerC4send_2to10completiony10Foundation4DataV_AA12ParticipantsOys5Error_pSgctF"
  },
  "title" : "send(_:to:completion:)"
}
-->

# send(_:to:completion:)

Sends a standard data object to other participants in the group session.

```
final func send(_ value: Data, to participants: Participants = .all, completion: @escaping ((any Error)?) -> Void)
```

## Parameters

`participants`

The recipients of the message. The default value
of this parameter is the set of all active participants in the
session. Use the [`Participants.only(_:)`](/documentation/GroupActivities/Participants/only(_:)-swift.enum.case) option
to specify a subset of participants.

`completion`

The handler block to call with the results of the
delivery attempt. The handler has no return value and takes a single
Error parameter. The value of this parameter is `nil` if delivery
succeeds; otherwise, it contains an appropriate error object.

## Discussion

Use this method to send data using a standard data object. Your app is
responsible for decoding and using the data it receives.

---

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)