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

# startBrowsingForNearbyPlayers(handler:)

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

## Declaration

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

## Discussion

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:) method to create a match or the addPlayers(to:matchRequest:completionHandler:) method to update an existing match. When you are done finding nearby players, call the stopBrowsingForNearbyPlayers() method. note: Before your game is released and during development, GameKit invokes the handler for all nearby players of all Game Center games.

## See Also

### Looking for nearby players

- [stopBrowsingForNearbyPlayers()](gamekit/gkmatchmaker/stopbrowsingfornearbyplayers().md)
