Type Method

loadSessionsInContainer:completionHandler:

Retrieves all of the game sessions associated with a container.

Declaration

+ (void)loadSessionsInContainer:(NSString *)containerName completionHandler:(void (^)(NSArray<GKGameSession *> *sessions, NSError *error))completionHandler;

Parameters

containerName

A unique string that identifies the container to be accessed.

completionHandler

A block that is called after all the game sessions have been loaded.

sessions

An array of GKGameSession objects that contains all of the game sessions associated with the specified container.

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
+ loadSessionWithIdentifier:completionHandler:

Loads a specific game session.

Deprecated
+ removeSessionWithIdentifier:completionHandler:

Removes the specified game session.

Deprecated