Contents

loadChallengableFriends(completionHandler:)

Loads players to whom the local player can issue a challenge.

Declaration

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

Parameters

  • completionHandler:

    A block that GameKit calls when this method loads players the local player can challenge.

    The block receives the following parameters:

    challengableFriends

    Players to whom the local player can issue a challenge. The local player can issue a challenge to a player with a friend level of FL1 or FL2.

    error

    Describes an error if it occurs, or nil if the operation completes. Possible errors include networking issues or an uninitialized player.

See Also

Accessing Friends and Recents