Protocol

GKGameSessionEventListener

An event listener that handles game session events.

Declaration

protocol GKGameSessionEventListener

Topics

Changing Player Status

func session(GKGameSession, didAdd: GKCloudPlayer)

Tells the listener a new player has been added to a game session.

func session(GKGameSession, didRemove: GKCloudPlayer)

Tells the listener a player left a game session.

func session(GKGameSession, player: GKCloudPlayer, didChange: GKConnectionState)

Tells the listener a player's connection state has changed.

enum GKConnectionState

Possible connection states for a player

Transferring Data

func session(GKGameSession, didReceive: Data, from: GKCloudPlayer)

Tells the listener the player received data from another player.

func session(GKGameSession, didReceiveMessage: String, with: Data, from: GKCloudPlayer)

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

func session(GKGameSession, player: GKCloudPlayer, didSave: Data)

Tells the listener data was saved by a player.

Relationships

Inherits From

See Also

Game Sessions

class GKCloudPlayer

The object representing the currently signed-in iCloud user.

Deprecated
class GKGameSession

A game session you can use to save game data, invite other players, and create turn-based and real-time game apps.

Deprecated
class GKGameSessionSharingViewController

A user interface you can use to invite other users into a tvOS game session.

Deprecated
struct GKGameSessionError

Error codes for the GKGameSession domain.

Deprecated
enum GKGameSessionError.Code

Error codes for the GKGameSession domain.

Deprecated
let GKGameSessionErrorDomain: String

The error domain for game sessions.

Deprecated