teamPlayerID
A unique identifier for a player of all the games that you distribute using your developer account.
Declaration
var teamPlayerID: 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 of your games that use the same developer Team ID. An instance is the time between when the game launches and when the game terminates. For more information about the Team ID, see Locate your Team ID.
For the local player (a GKLocalPlayer object), this identifier is the same across all local player instances of your games. If the player is friends with the local player, this identifier is the same 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. If you need to use the teamPlayerID for tracking players across multiple games, also store the gamePlayerID property. For more information, see Protecting the player’s privacy using scoped identifiers.
If you transfer your game to another developer, the teamPlayerID property isn’t the same for the new developer. For more information, see Overview of app transfer.