loadRecentPlayers(completionHandler:)
Loads players from the friends list or players that recently participated in a game with the local player.
Declaration
func loadRecentPlayers(completionHandler: (@Sendable ([GKPlayer]?, (any Error)?) -> Void)? = nil)func loadRecentPlayers() async throws -> [GKPlayer]Parameters
- completionHandler:
The block that GameKit calls when it completes the request.
The block receives the following parameters:
recentPlayersPlayers from the friends list or players that recently participated in a game with the local player.
errorDescribes an error if it occurs, or
nilifthe operation completes. Possible errors include network and authentication issues.