startBrowsingForNearbyPlayers(handler:)
Finds nearby players through Bluetooth or WiFi on the same subnet.
Declaration
func startBrowsingForNearbyPlayers(handler reachableHandler: ((GKPlayer, Bool) -> Void)? = nil)Parameters
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.