Contents

send(_:to:completion:)

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

Declaration

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 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.

See Also

Sending data to the group