Contents

loadAchievementDescriptions(completionHandler:)

Downloads the localized descriptions of achievements from Game Center.

Declaration

class func loadAchievementDescriptions(completionHandler: (@Sendable ([GKAchievementDescription]?, (any Error)?) -> Void)? = nil)
class func loadAchievementDescriptions() async throws -> [GKAchievementDescription]

Parameters

  • completionHandler:

    A block that GameKit calls when this method completes the download.

    The block receives the following parameters:

    descriptions

    The Gkachievementdescription objects that contain the localized text for the achievements in your game.

    error

    Describes an error if it occurs, or nil if the operation completes.

Mentioned in

Discussion

To load the artwork for an achievement, use the loadImage(completionHandler:) method after using this method.