Instance Method

session:didReceiveMessage:withData:fromPlayer:

Tells the listener a player has received a message from another player.

Declaration

- (void)session:(GKGameSession *)session didReceiveMessage:(NSString *)message withData:(NSData *)data fromPlayer:(GKCloudPlayer *)player;

Parameters

session

The game session the sending player is associated with.

message

A String containing the message sent to other players.

data

Any data associated with the message. The value of this parameter can be nil.

player

The player who sent the message.

Discussion

This event fires after the sendMessageWithLocalizedFormatKey:arguments:data:toPlayers:badgePlayers:completionHandler: method has been called. Only players contained in the players argument of the sendMessageWithLocalizedFormatKey:arguments:data:toPlayers:badgePlayers:completionHandler: method are notified.

See Also

Transferring Data

- session:didReceiveData:fromPlayer:

Tells the listener the player received data from another player.

Deprecated
- session:player:didSaveData:

Tells the listener data was saved by a player.

Deprecated