I'm using GameKit's
GKMatchMaker
to look for nearby players with startBrowsingForNearbyPlayers()
. I got stuck for a while because I didn't know that the "Nearby Players" toggle in the Game Center pane in Settings
was turned off.
The phone could see other nearby players, but they couldn't see it. Turning "Nearby Players" on fixed the problem.
The normal GameKit matchmaking techniques still work without "Nearby Players", so it's entirely possible for a person (even a heavy Game Center user) to have it turned off and not know it. But since my app relies on nearby player matching, it will fail silently and users will just think it doesn't work.
I would like to be able to test for the "Nearby Players" setting so I can warn a user that they're not visible to other players before wasting their time. It would be even better if I could prompt them to turn "Nearby Players" on. GKLocalPlayer
doesn't seem to have any related properties, and I'm not sure where else to look.
Is there any way to check if "Nearby Players" is enabled?