Instance Method

initWithLeaderboardIdentifier:forPlayer:

Returns an initialized score object for the specified leaderboard and player.

Declaration

- (instancetype)initWithLeaderboardIdentifier:(NSString *)identifier forPlayer:(NSString *)playerID;

Parameters

identifier

Identifies the leaderboard that the score is being sent to.

playerID

The identifier of the player who’s score is being initialized.

Return Value

An initialized score object, or nil if an error occurred.

Discussion

Your game explicitly allocates and initializes a score object using the designated player and current date when it needs to report a new score to Game Center.

See Also

Deprecated Methods and Properties

category

The leaderboard that this score belongs to.

Deprecated
- challengeComposeControllerWithPlayers:message:completionHandler:

Provides a challenge compose view controller with pre-selected player identifiers and a preformatted, player-editable message.

Deprecated
- initWithCategory:

Returns an initialized score object.

Deprecated
- issueChallengeToPlayers:message:

Issues a score challenge to a set of players.

Deprecated
playerID

The player identifier for the player that earned the score.

Deprecated
- reportScoreWithCompletionHandler:

Reports a score to Game Center.

Deprecated