Instance Method


Transmits data to a list of connected players.


func send(_ data: Data, to players: [GKPlayer], dataMode mode: GKMatch.SendDataMode) throws



The bytes to be sent.


An array of GKPlayer objects containing the identifier strings for the list of players who should receive the data.


The mechanism used to send the data.


If the data could not be queued, on return, this parameter holds an NSError object describing the error.

Return Value

true if the data was successfully queued for transmission; false if the match was unable to queue the data.


The match queues the data and transmits it when the network becomes available.

See Also

Sending Data to Other Players

func chooseBestHostingPlayer(completionHandler: (GKPlayer?) -> Void)

Determines the best player in the game to act as the server for a client-server match.

func sendData(toAllPlayers: Data, with: GKMatch.SendDataMode)

Transmits data to all players connected to the match.

enum GKMatch.SendDataMode

The mechanism used to transmit data to other players.