selectChallengeablePlayers(_:withCompletionHandler:)
Finds the subset of players who can earn an achievement.
Declaration
func selectChallengeablePlayers(_ players: [GKPlayer], withCompletionHandler completionHandler: (@Sendable ([GKPlayer]?, (any Error)?) -> Void)? = nil)func selectChallengeablePlayers(_ players: [GKPlayer]) async throws -> [GKPlayer]Parameters
- players:
A list of players that GameKit uses to find players who are eligible to earn the achievement.
- completionHandler:
A block that GameKit calls when this method completes.
The block receives the following parameters:
challengeablePlayersThe players in the
playersparameter who are able to earn the achievement.errorDescribes an error if it occurs, or
nilif the operation completes.