---
title: "loadRecentPlayers(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gklocalplayer/loadrecentplayers(completionhandler:)"
---

# loadRecentPlayers(completionHandler:)

Loads players from the friends list or players that recently participated in a game with the local player.

## Declaration

```swift
func loadRecentPlayers(completionHandler: (@Sendable ([GKPlayer]?, (any Error)?) -> Void)? = nil)
```

```swift
func loadRecentPlayers() async throws -> [GKPlayer]
```

## Parameters

- `completionHandler`: The block that GameKit calls when it completes the request. The block receives the following parameters:

## See Also

### Accessing Friends and Recents

- [loadFriendsAuthorizationStatus(_:)](gamekit/gklocalplayer/loadfriendsauthorizationstatus(_:).md)
- [GKFriendsAuthorizationStatus](gamekit/gkfriendsauthorizationstatus.md)
- [loadFriends(_:)](gamekit/gklocalplayer/loadfriends(_:).md)
- [loadFriends(identifiedBy:completionHandler:)](gamekit/gklocalplayer/loadfriends(identifiedby:completionhandler:).md)
- [NSGKFriendListUsageDescription](bundleresources/information-property-list/nsgkfriendlistusagedescription.md)
- [loadChallengableFriends(completionHandler:)](gamekit/gklocalplayer/loadchallengablefriends(completionhandler:).md)
