<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchmaker/startBrowsingForNearbyPlayers(handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKMatchmaker(im)startBrowsingForNearbyPlayersWithHandler:"
  },
  "title" : "startBrowsingForNearbyPlayers(handler:)"
}
-->

# startBrowsingForNearbyPlayers(handler:)

Finds nearby players through Bluetooth or WiFi on the same subnet.

```
func startBrowsingForNearbyPlayers(handler reachableHandler: ((GKPlayer, Bool) -> Void)? = nil)
```

## Parameters

`reachableHandler`

The block that GameKit calls when it completes the request.

    This block receives the following parameters:

- `player`: The player whose reachability status changes.
- `reachable`: <doc://com.apple.documentation/documentation/Swift/true> if a new nearby player appears. <doc://com.apple.documentation/documentation/Swift/false> if a previously discovered player disappears.

## Discussion

Use the `reachableHandler` implementation to update your interface with information about nearby players. If the local player wants to invite a nearby player, call the [`findMatch(for:withCompletionHandler:)`](/documentation/GameKit/GKMatchmaker/findMatch(for:withCompletionHandler:)) method to create a match or the [`addPlayers(to:matchRequest:completionHandler:)`](/documentation/GameKit/GKMatchmaker/addPlayers(to:matchRequest:completionHandler:)) method to update an existing match. When you are done finding nearby players, call the [`stopBrowsingForNearbyPlayers()`](/documentation/GameKit/GKMatchmaker/stopBrowsingForNearbyPlayers()) method.

> Note:
> Before your game is released and during development, GameKit invokes the handler for all nearby players of all Game Center games.

---

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)