<!--
{
  "availability" : [
    "iOS: 14.5.0 -",
    "iPadOS: 14.5.0 -",
    "macCatalyst: 14.5.0 -",
    "macOS: 11.3.0 -",
    "tvOS: 14.5.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKLocalPlayer/loadFriends(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLocalPlayer(im)loadFriends:"
  },
  "title" : "loadFriends(_:)"
}
-->

# loadFriends(_:)

Loads the local player’s friends list if the local player and their friends grant access.

```
func loadFriends(_ completionHandler: @escaping @Sendable ([GKPlayer]?, (any Error)?) -> Void)
```

## Parameters

`completionHandler`

The block that GameKit calls when it completes the request.

    The block receives the following parameters:

- `friends`: The player’s friends who also grant your game access to their friends.

    The local player and their friends authorization status must be [`GKFriendsAuthorizationStatus.authorized`](/documentation/GameKit/GKFriendsAuthorizationStatus/authorized)    .

    The local player and their friends must use a version of your game with the same bundle ID.

- `error`: Describes an error if it occurs, or `nil` if the operation completes.

## Discussion

If the [`loadFriendsAuthorizationStatus(_:)`](/documentation/GameKit/GKLocalPlayer/loadFriendsAuthorizationStatus(_:)) method returns [`GKFriendsAuthorizationStatus.notDetermined`](/documentation/GameKit/GKFriendsAuthorizationStatus/notDetermined), GameKit presents a prompt to the local player requesting access to their friends that may pause your game. GameKit displays the localized reason that you provide for the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSGKFriendListUsageDescription> key in the information property list.

If you loaded friends who no longer appear in the `friends` parameter of the completion handler, remove the data for those friends from your game because they no longer grant your game access to that data.

---

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)