GCKPlayerInfo Class
Stay organized with collections
Save and categorize content based on your preferences.
Represents data for a single player.
- Deprecated:
- The Game Manager API is no longer supported and will be removed in a future release.
Inherits NSObject.
|
(instancetype) | - init |
| Default initializer is not available. More...
|
|
Default initializer is not available.
The unique string identifier of this player.
The current state of the player.
Player-specific data defined by the game.
This data is persisted while the game is running. Will be either an object that can be serialized to JSON using NSJSONSerialization, or nil
.
True if this player is was created on this sender device.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGCKPlayerInfo\u003c/code\u003e class represents data for a single player in a game session, including player ID, state, and custom data.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the Game Manager API, which is deprecated and will be removed in a future release.\u003c/p\u003e\n"],["\u003cp\u003ePlayers have properties such as \u003ccode\u003eplayerID\u003c/code\u003e, \u003ccode\u003eplayerState\u003c/code\u003e, \u003ccode\u003eplayerData\u003c/code\u003e, \u003ccode\u003eisConnected\u003c/code\u003e, and \u003ccode\u003eisControllable\u003c/code\u003e that provide information about their status and connection.\u003c/p\u003e\n"],["\u003cp\u003eA player is considered connected if their \u003ccode\u003eplayerState\u003c/code\u003e is \u003ccode\u003eAvailable\u003c/code\u003e, \u003ccode\u003eReady\u003c/code\u003e, \u003ccode\u003eIdle\u003c/code\u003e, or \u003ccode\u003ePlaying\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eisControllable\u003c/code\u003e indicates if the player was created on the current sender device.\u003c/p\u003e\n"]]],[],null,["# GCKPlayerInfo Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKPlayerInfo Class Reference \n\nOverview\n--------\n\nRepresents data for a single player.\n\n**[Deprecated:](/cast/v3/reference/ios/deprecated#_deprecated000034)**\n: The Game Manager API is no longer supported and will be removed in a future release.\n\nInherits NSObject.\n\n|----------------|------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - [init](/cast/v3/reference/ios/interface_g_c_k_player_info#a89f3be2a574f25fdc46c6e5d7dd4d573) |\n| | Default initializer is not available. [More...](#a89f3be2a574f25fdc46c6e5d7dd4d573) |\n| ||\n\n|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| NSString \\* | [playerID](/cast/v3/reference/ios/interface_g_c_k_player_info#a44a8551b19bb66ee6b1530a6c9830ce3) |\n| | The unique string identifier of this player. [More...](#a44a8551b19bb66ee6b1530a6c9830ce3) |\n| ||\n| [GCKPlayerState](/cast/v3/reference/ios/g_c_k_player_state_8h#aa9a411f5c852bb7871c5f6584e11f4d6) | [playerState](/cast/v3/reference/ios/interface_g_c_k_player_info#a2f8fa3a0d0dce2d25d02b064ce56f7c5) |\n| | The current state of the player. [More...](#a2f8fa3a0d0dce2d25d02b064ce56f7c5) |\n| ||\n| id | [playerData](/cast/v3/reference/ios/interface_g_c_k_player_info#a2bf6c1907bdb9c3199555c368555c66e) |\n| | Player-specific data defined by the game. [More...](#a2bf6c1907bdb9c3199555c368555c66e) |\n| ||\n| BOOL | [isConnected](/cast/v3/reference/ios/interface_g_c_k_player_info#ad78f0b377f667d189ad2cbcac3f26023) |\n| | True if this player is in a connected state. [More...](#ad78f0b377f667d189ad2cbcac3f26023) |\n| ||\n| BOOL | [isControllable](/cast/v3/reference/ios/interface_g_c_k_player_info#a28257a72c946d2296617e619390be34c) |\n| | True if this player is was created on this sender device. [More...](#a28257a72c946d2296617e619390be34c) |\n| ||\n\nMethod Detail\n-------------\n\n|-----------------------|---|---|---|\n| - (instancetype) init | | | |\n\nDefault initializer is not available.\n\nProperty Detail\n---------------\n\n|---------------------------------------------------------|-------------------|\n| |-------------------------| | - (NSString\\*) playerID | | readnonatomiccopy |\n\nThe unique string identifier of this player. \n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|\n| |------------------------------------------------------------------------------------------------------------------| | - ([GCKPlayerState](/cast/v3/reference/ios/g_c_k_player_state_8h#aa9a411f5c852bb7871c5f6584e11f4d6)) playerState | | readnonatomicassign |\n\nThe current state of the player. \n\n|---------------------------------------------|-------------------|\n| |-------------------| | - (id) playerData | | readnonatomiccopy |\n\nPlayer-specific data defined by the game.\n\nThis data is persisted while the game is running. Will be either an object that can be serialized to JSON using [**NSJSONSerialization**](https://goo.gl/0vd4Q2), or `nil`. \n\n|---------------------------------------------------|---------------------|\n| |----------------------| | - (BOOL) isConnected | | readnonatomicassign |\n\nTrue if this player is in a connected state.\n\nA player is considered to be in a connected state if the associated [GCKPlayerInfo::playerState](/cast/v3/reference/ios/interface_g_c_k_player_info#a2f8fa3a0d0dce2d25d02b064ce56f7c5 \"The current state of the player. \") is one of [GCKPlayerStateAvailable](/cast/v3/reference/ios/g_c_k_player_state_8h#aa9a411f5c852bb7871c5f6584e11f4d6aa45be92bf9f623b97cd1451ba70b17fc), [GCKPlayerStateReady](/cast/v3/reference/ios/g_c_k_player_state_8h#aa9a411f5c852bb7871c5f6584e11f4d6a67c467391f891b6ca8cf79f1ce10b561), [GCKPlayerStateIdle](/cast/v3/reference/ios/g_c_k_player_state_8h#aa9a411f5c852bb7871c5f6584e11f4d6af675a8e49374d9b30e18589adbf4a687), or [GCKPlayerStatePlaying](/cast/v3/reference/ios/g_c_k_player_state_8h#aa9a411f5c852bb7871c5f6584e11f4d6aa01672db33b85b34abc2d7f21518eb1a). \n\n|---------------------------------------------------------|---------------------|\n| |-------------------------| | - (BOOL) isControllable | | readnonatomicassign |\n\nTrue if this player is was created on this sender device."]]