Instance Property

player

The player identifier for the player that earned the score.

Declaration

iOS, Mac Catalyst, tvOS, watchOS
@property(readonly, retain, nonatomic) GKPlayer *player;
macOS
@property(readonly, retain, atomic) GKPlayer *player;

Discussion

When you initialize a new score object, the player property is set to the identifier for the local player. If the score object was returned to your game by loading scores from Game Center, the player property identifies the player who recorded that score.

See Also

Score Properties

context

An integer value used by your game.

date

The date and time when the score was earned.

formattedValue

Returns the player’s score as a localized string.

leaderboardIdentifier

The identifier for the leaderboard.

rank

The position of the score in the results of a leaderboard search.

value

The score earned by the player.