Type Method

loadSessionWithIdentifier:completionHandler:

Loads a specific game session.

Declaration

+ (void)loadSessionWithIdentifier:(NSString *)identifier completionHandler:(void (^)(GKGameSession *session, NSError *error))completionHandler;

Parameters

identifier

A unique string that identifies the game session to be loaded.

completionHandler

A block that is called after the game session has been loaded.

session

The GKGameSession object associated with the specified identifier.

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

Creating and Loading Game Sessions

+ createSessionInContainer:withTitle:maxConnectedPlayers:completionHandler:

Creates a new game session inside of an iCloud container.

Deprecated
+ loadSessionsInContainer:completionHandler:

Retrieves all of the game sessions associated with a container.

Deprecated
+ removeSessionWithIdentifier:completionHandler:

Removes the specified game session.

Deprecated