Instance Method

initWithIdentifier:forPlayer:

Initializes an achievement for a specific player.

Declaration

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

Parameters

identifier

A string that matches the identifier string for an achievement you created for your game in App Store Connect.

player_ID

The identifier for the player associated with the specified achievement.

Discussion

Your game initializes a new achievement object for a specific player only when it has not previously reported progress for that achievement. Use this method to submit a participant’s achievement when ending a turn-based match.

See Also

Deprecated Methods and Properties

- challengeComposeControllerWithPlayers:message:completionHandler:

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

Deprecated
hidden

A Boolean value that states whether this achievement is normally kept secret from the player.

Deprecated
- issueChallengeToPlayers:message:

Issue an achievement challenge to a list of players.

Deprecated
playerID

A string used to identify the player who earned the achievement.

Deprecated
- reportAchievementWithCompletionHandler:

Reports the player’s progress to Game Center.

Deprecated
- selectChallengeablePlayerIDs:withCompletionHandler:

Finds the subset of players that can earn an achievement.

Deprecated