Contents

init(identifier:forPlayer:)

Initializes an achievement for a specific player.

Declaration

init?(identifier: String?, forPlayer playerID: String)

Parameters

  • identifier:

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

  • playerID:

    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.