Felixyz
Felixyz

Reputation: 19143

GameKit wifi connection?

I've read that as of iPhone OS 3.1, GameKit supports wifi connections. But the documentation states:

"If your application configures the peer picker to allow Internet connections, your application must also dismiss the peer picker and present its own interface to configure an internet connection."

Does this still stand? If so, how do I establish a wifi Bonjour session that can be used by GK? (I'm only interested in using the local network.)

Upvotes: 9

Views: 5334

Answers (2)

Gajendrasinh Chauhan
Gajendrasinh Chauhan

Reputation: 3397

You can use GKPeerPicker class..There is connectionTypesMask,it has property GKPeerPickerConnectionTypeNearby (for bluetooth connection or wireless). For more detail see my original answer.. gamekit over the internet

Upvotes: 0

ImHuntingWabbits
ImHuntingWabbits

Reputation: 3827

Your GKSession object will automatically handle the discovery of peers over WiFi or Bluetooth, and find those that are available on either protocol.

The documentation is stating that unlike Bluetooth, for which GKPeerPickerController provides a UI to enable Bluetooth if it's not already enabled, GKPeerPickerController does not provide a UI to enable wifi, or select the network the user wishes to be on, you will have to provide your own.

Upvotes: 13

Related Questions