<!--
{
  "availability" : [
    "iOS: 4.1.0 -",
    "iPadOS: 4.1.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKAchievement",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKAchievement"
  },
  "title" : "GKAchievement"
}
-->

# GKAchievement

An achievement you can award a player as they make progress toward and reach a goal in your game.

```
class GKAchievement
```

## Overview

Before using this class, configure your game achievements in App Store Connect. Then the dashboard shows the achievements initially locked and you can access them in your code.

Use the [`loadAchievements(completionHandler:)`](/documentation/GameKit/GKAchievement/loadAchievements(completionHandler:)) method to load all the achievements that the local player is progressing toward. If an achievement doesn’t load, then it’s the first time you’re reporting the player’s progress toward it, and you must create a [`GKAchievement`](/documentation/GameKit/GKAchievement) object to represent it. Next, set the percentage complete of the achievement using the [`percentComplete`](/documentation/GameKit/GKAchievement/percentComplete) property.

You can report the player’s progress for one or more achievements to Game Center using the [`report(_:withCompletionHandler:)`](/documentation/GameKit/GKAchievement/report(_:withCompletionHandler:)) method. The dashboard changes the appearance of the achievements to show the current percentages. If you set the percentage of an achievement to 100, the dashboard shows it as completed.

To reset the player’s progress on all achievements, use the [`resetAchievements(completionHandler:)`](/documentation/GameKit/GKAchievement/resetAchievements(completionHandler:)) class method.

## Topics

### Loading and Initializing Achievements

[`+  loadAchievementsWithCompletionHandler:`](/documentation/GameKit/GKAchievement/loadAchievements(completionHandler:))

Loads the achievements that you previously reported the player making progress toward.

[`-  initWithIdentifier:`](/documentation/GameKit/GKAchievement/init(identifier:))

Initializes an achievement for the local player.

[`-  initWithIdentifier:player:`](/documentation/GameKit/GKAchievement/init(identifier:player:))

Initializes an achievement for a player.

### Accessing Achievement Properties

[`identifier`](/documentation/GameKit/GKAchievement/identifier)

The identifier for the achievement that you enter in App Store Connect.

[`player`](/documentation/GameKit/GKAchievement/player)

The player who earned the achievement.

[`percentComplete`](/documentation/GameKit/GKAchievement/percentComplete)

A percentage value that states how far the player has progressed on the achievement.

[`completed`](/documentation/GameKit/GKAchievement/isCompleted)

A Boolean value that states whether the player has completed the achievement.

[`lastReportedDate`](/documentation/GameKit/GKAchievement/lastReportedDate)

The last time your game reported progress on the achievement for the player.

### Reporting Progress on Achievements

[`+  reportAchievements:withCompletionHandler:`](/documentation/GameKit/GKAchievement/report(_:withCompletionHandler:))

Reports the player’s progress of players toward one or more achievements.

[`+  reportAchievements:withEligibleChallenges:withCompletionHandler:`](/documentation/GameKit/GKAchievement/report(_:withEligibleChallenges:withCompletionHandler:))

Reports the player’s progress on achievements and limits the challenges, associated with those achievements, that the player may complete.

[`showsCompletionBanner`](/documentation/GameKit/GKAchievement/showsCompletionBanner)

A Boolean value that indicates whether GameKit displays a banner when the player completes the achievement.

[`+  resetAchievementsWithCompletionHandler:`](/documentation/GameKit/GKAchievement/resetAchievements(completionHandler:))

Resets the percentage completed for all of the player’s achievements.

### Issuing Achievement Challenges

[`-  selectChallengeablePlayers:withCompletionHandler:`](/documentation/GameKit/GKAchievement/selectChallengeablePlayers(_:withCompletionHandler:))

Finds the subset of players who can earn an achievement.

[`-  challengeComposeControllerWithMessage:players:completion:`](/documentation/GameKit/GKAchievement/challengeComposeController(withMessage:players:completion:))

Provides a view controller that you present to the player to issue an achievement challenge.

[`GKChallengeComposeHandler`](/documentation/GameKit/GKChallengeComposeHandler)

A completion block that provides information about the player who issues a challenge and the players who receive it.

[`-  challengeComposeControllerWithMessage:players:completionHandler:`](/documentation/GameKit/GKAchievement/challengeComposeController(withMessage:players:completionHandler:))

Provides a view controller that you present to the player to issue an achievement challenge.

[`-  challengeComposeControllerWithPlayers:message:completionHandler:`](/documentation/GameKit/GKAchievement/challengeComposeController(withPlayers:message:completionHandler:))

Provides a challenge compose view controller with preselected player identifiers and a message.

### Deprecated

[Deprecated Symbols](/documentation/GameKit/gkachievement-deprecated-symbols)

Review unsupported symbols and their replacements.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)