Type Method

removeSessionWithIdentifier:completionHandler:

Removes the specified game session.

Declaration

+ (void)removeSessionWithIdentifier:(NSString *)identifier completionHandler:(void (^)(NSError *error))completionHandler;

Parameters

identifier

The unique string that identifies the game session to be removed.

completionHandler

A block that is called after a game session has been removed from a 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.

Discussion

After the user has finished a game or decides to abandon a game, you must use this function to remove the game session from iCloud. Game sessions are not removed from iCloud automatically.

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

Retrieves all of the game sessions associated with a container.

Deprecated