GKAchievement

extension GKAchievement
  • Earn an achievment with a given identifier.

    Declaration

    Swift

    static func earn(with identifier: String)

    Parameters

    identifier

    The identifier that links to the achievement to earn.

  • Earn an achievement with a given achievement.

    Declaration

    Swift

    static func earn(with achievementName: GameAchievement)

    Parameters

    achievementName

    The game achievement that the player will earn.

  • Update the progress on an achievement.

    Declaration

    Swift

    static func updateProgress(on identifier: String, to percent: Double)
  • Update the progress on earning an achievmeent.

    Declaration

    Swift

    static func updateProgress(on achievementName: GameAchievement, to percent: Double)

    Parameters

    achievementName

    The achievement that the player has progressed on.

    percent

    The percent complete.