Instance Method

sendData:withTransportType:completionHandler:

Sends the indicated data to all connected players.

Declaration

- (void)sendData:(NSData *)data withTransportType:(GKTransportType)transport completionHandler:(void (^)(NSError *error))completionHandler;

Parameters

data

A Data object containing the information to be sent.

transport

Determines how the data is sent.

completionHandler

A block that is called after the data has been sent.

error

If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is nil. See GameKit Constants for a list of error codes specific to GameKit.

See Also

Connecting Players for Real-Time Communication

- setConnectionState:completionHandler:

Sets the connection state for the player.

Deprecated
- playersWithConnectionState:

Retrieves a list of players with the specified connection state.

Deprecated
GKTransportType

The mechanism used to send messages to other players in a game session.