---
title: "startBrowsingForNearbyPlayers(reachableHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatchmaker/startbrowsingfornearbyplayers(reachablehandler:)"
---

# startBrowsingForNearbyPlayers(reachableHandler:)

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

## Declaration

```swift
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:

## Discussion

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:) to create a match or addPlayers(to:matchRequest:completionHandler:) method to update a match.

## See Also

### Deprecated Methods

- [cancelInvite(toPlayer:)](gamekit/gkmatchmaker/cancelinvite(toplayer:).md)
- [findPlayers(forHostedMatchRequest:withCompletionHandler:)](gamekit/gkmatchmaker/findplayers(forhostedmatchrequest:withcompletionhandler:).md)
