Here's what I've figured out:
- You do not need to turn off Bluetooth in order to use wifi.
- I have not verified if you need to do this if you have other bluetooth gadgets communicating with your device. I would assume yes, as they would be interfering with your wifi.
- You should not create a GKSession if you won't be using Bluetooth, otherwise it seems to eat up Bluetooth resources, therefore causing problems even if it is not connected to another iPod/iPhone.
So this presents a dilemma when it comes time for the user to decide how to host or connect to another game! I will likely do something like this:
Hosting:
- [ Local Game ]
- Visible on bluetooth only. Doesn't advertise on the lobby or respond to LAN broadcasts.
- [ WiFi/3G game ]
- Visible on LAN and 3G (I don't have an iPhone to test this with yet).
Join game:
- [ Local game ]
- Starts a GKSession and picker, looking for servers.
- [ Internet game ]
- LAN broadcasts, lobby server, etc.
It's probably less user-friendly, but should have better performance overall.
The above 4 options are one more than my current UI is using, which includes a one-click host game button which starts a GKSession and uses sockets. Obviously I have to fix that now.
So, what's the disadvantage here? Mostly just having really diverse connection options, like Laptop (( wifi )) iPhone 1 (( Bluetooth )) iPhone 2