gamePlayerID
A unique identifier for a player of the game.
Declaration
var gamePlayerID: String { get }Mentioned in
Discussion
This identifier is unique to this game instance if the scopedIDsArePersistent() method returns false. Otherwise, this identifier is the same across all game instances. An instance is the time between when the game launches and when the game terminates.
For the local player (a GKLocalPlayer object), this identifier is persistent across all local player instances of the game. If the player is friends with the local player, this identifier is persistent across all local player and friend game instances. To determine whether the player is a friend, use the loadFriends(_:) method.
To protect the player’s privacy, use the gamePlayerID property instead of the teamPlayerID property. For more information, see Protecting the player’s privacy using scoped identifiers.
If you transfer your game to another developer, the gamePlayerID property is the same for the new developer. For more information, see Overview of app transfer.