GKLeaderboard

extension GKLeaderboard
  • Submit a score to the following leaderboard.

    This function applies to classic and recurring leaderboards.

    Important

    This function is only available on Macs running macOS 11.0.

    Declaration

    Swift

    @available(macOS 11.0, *)
    static func submit(to leaderboard: String, with score: Int)

    Parameters

    leaderboard

    The ID of the leaderboard.

    score

    The score to submit to the leaderboard.

  • Submit a score to the following leaderboard.

    This function applies to classic and recurring leaderboards.

    Important

    This function is only available on Macs running macOS 11.0.

    Declaration

    Swift

    @available(macOS 11.0, *)
    static func submit(to leaderboardID: GameLeaderboard, with score: Int)

    Parameters

    leaderboard

    The game leaderboard ID to submit a score to.

    score

    The score to submit to the leaderboard.