Creates a new game session inside of an iCloud container.
- iOS 10.0–12.0Deprecated
- macOS 10.12–10.14Deprecated
- tvOS 10.0–12.0Deprecated
Stringvalue representing the iCloud container for the game session.
Stringvalue representing the title of the game session.
Integervalue indicating the maximum number of players allowed in the game session.
A block that is called after a new game session has been created.
GKGameobject containing information about the newly created game session.
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.
The container name must be a valid iCloud container associated with your app. After a user has finished a game and is done with a game session, remove the created game session from iCloud using
remove. See iCloud Design Guide for more information on incorporating iCloud in your app.