GKChallengeDefinition

Inherits: RefCounted < Object

Describes a challenge template configured in Game Center.

Description

Wraps GKChallengeDefinition, including metadata, repeatability, and image/loading helpers.

Properties

String

details

""

Array

duration_options

[]

String

group_identifier

""

String

identifier

""

bool

is_repeatable

false

GKLeaderboard

leaderboard

null

int

release_state

0

String

title

""

Methods

void

has_active_challenges(callback: Callable)

void

load_challenge_definitions(callback: Callable) static

void

load_image(callback: Callable)


Property Descriptions

String details = "" 🔗

  • String get_details()

Detailed challenge description.


Array duration_options = [] 🔗

  • Array get_duration_options()

Supported challenge durations represented as date-component dictionaries.


String group_identifier = "" 🔗

  • String get_group_identifier()

Group identifier for related challenge definitions.


String identifier = "" 🔗

  • String get_identifier()

Unique challenge definition identifier.


bool is_repeatable = false 🔗

  • bool get_is_repeatable()

Whether the challenge can be repeated.


GKLeaderboard leaderboard = null 🔗

Associated leaderboard, if this definition tracks score.


int release_state = 0 🔗

  • int get_release_state()

Apple release-state raw value.


String title = "" 🔗

  • String get_title()

Display title.


Method Descriptions

void has_active_challenges(callback: Callable) 🔗

Checks whether this definition currently has active challenges. The callback receives (bool has_active, Variant error).


void load_challenge_definitions(callback: Callable) static 🔗

Loads challenge definitions for the current player/account context.


void load_image(callback: Callable) 🔗

Loads this challenge definition’s image.