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

# GKChallengeDefinition

An object that represents the static metadata you define for the challenge.

```
class GKChallengeDefinition
```

## Topics

### Getting the display properties and image

[`title`](/documentation/GameKit/GKChallengeDefinition/title)

A short title for the challenge definition.

[`details`](/documentation/GameKit/GKChallengeDefinition/details)

A more detailed description of the challenge definition.

[`-  loadImageWithCompletionHandler:`](/documentation/GameKit/GKChallengeDefinition/loadImage(completionHandler:))

Loads the image set on the challenge definition, which may be `nil` if none was set.

### Getting the challenge rules

[`durationOptions`](/documentation/GameKit/GKChallengeDefinition/durationOptions)

The duration options for the challenge, like `1 day` or `1 week`.

[`isRepeatable`](/documentation/GameKit/GKChallengeDefinition/isRepeatable)

Indicates if a challenge can be attempted more than once.

### Getting the leaderboard

[`leaderboard`](/documentation/GameKit/GKChallengeDefinition/leaderboard)

Scores submitted to this leaderboard will also be submitted as scores in this challenge.

### Getting the release state

[`releaseState`](/documentation/GameKit/GKChallengeDefinition/releaseState)

The release state of the challenge definition in App Store Connect.

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

Describes the release state of an App Store Connect resource, such as an Achievement or Leaderboard.

### Getting the identifier properties

[`groupIdentifier`](/documentation/GameKit/GKChallengeDefinition/groupIdentifier)

The group identifier for the challenge definition, if one exists.

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

The developer defined identifier for a given challenge definition.

### Loading challenge definitions

[`+  loadChallengeDefinitionsWithCompletionHandler:`](/documentation/GameKit/GKChallengeDefinition/loadChallengeDefinitions(completionHandler:))

Loads all the challenge definitions for the current game, returns an empty array if none exist.

### Checking for active challenges

[`-  hasActiveChallengesWithCompletionHandler:`](/documentation/GameKit/GKChallengeDefinition/hasActiveChallenges(completionHandler:))

Indicates if this definition has active challenges associated with it.

## Relationships

### Inherits From

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

### Conforms To

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

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

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

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

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

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

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

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

---

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)