<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKLocalPlayer/loadRecentPlayers(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLocalPlayer(im)loadRecentPlayersWithCompletionHandler:"
  },
  "title" : "loadRecentPlayers(completionHandler:)"
}
-->

# loadRecentPlayers(completionHandler:)

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

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

## Parameters

`completionHandler`

The block that GameKit calls when it completes the request.

    The block receives the following parameters:

- `recentPlayers`: Players from the friends list or players that recently participated in a game with the local player.
- `error`: Describes an error if it occurs, or `nil` if `t`he operation completes. Possible errors include network and authentication issues.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)