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

# startBrowsingForNearbyPlayers(reachableHandler:)

Enables the matchmaking process to find nearby players through Bluetooth or WiFi, but only on the same subnet.

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

## Parameters

`reachableHandler`

A block to call when the reachability for a player changes. The block takes the following parameters:

- *playerID*: The player identifier for the player whose reachability status has changed.
- *reachable*: <doc://com.apple.documentation/documentation/Swift/true> if GameKit discovers a new player locally, <doc://com.apple.documentation/documentation/Swift/false> if a previously discovered player disappears.

## Discussion

Use this method only when you are implementing programmatic matchmaking. After enabling browsing for nearby players, use the responses to populate your user interface with information about nearby players. If a player wants to invite a player to a game, add that player’s player identifier to a match request and call either the [`findMatch(for:withCompletionHandler:)`](/documentation/GameKit/GKMatchmaker/findMatch(for:withCompletionHandler:)) to create a match or [`addPlayers(to:matchRequest:completionHandler:)`](/documentation/GameKit/GKMatchmaker/addPlayers(to:matchRequest:completionHandler:)) method to update a match.

---

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)