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:
challengableFriendsPlayers 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.
errorDescribes an error if it occurs, or
nilif the operation completes. Possible errors include networking issues or an uninitialized player.