views:

872

answers:

3

I am looking for a way to establish a wireless connection between an iPhone and a desktop client. Gamekit looks promising but all the examples / documentation only explain iPhone to iPhone.

  • Are there examples / documentation for an Gamekit peer on the desktop (cocoa or java)?
  • What are the alternatives without doing to much low level socket programming?
+2  A: 

The iPhone emulator does not run these bluetooth p2p connections. Hence, it can only be tested with real hardware.

It is a little confusing because the GKSession reference talks only about being a way to connect peers over bluetooth, while the GKPeerPickerController states "can be configured to select between Bluetooth and Internet connections." However there's a clear note there that they're not really going to help you with internet based connections.

dlamblin
Well I don’t want to connect two iPhones. I am looking for a way to connect my iPhone with an desktop application (written in cocao or java). And I wonder if I could use GameKit.
Steilpass
+1  A: 

Here is the answer you seek!

http://stackoverflow.com/questions/3240617/cfnetwork-and-bonjour-integration-for-iphone-to-mac-integration

Jordan
This example is really interesting, however it's not compatible with GameKit or Bluetooth. Many Thanks!
rjobidon
I offer you 50 pts because your answer is great, however I'm still looking for GameKit Bluetooth protocol with a desktop peer. Regards
rjobidon
A: 

This is unfortunately a non-answer, but...

GameKit is an abstraction of the bluetooth and wifi networking layers, allowing a specific set of protocols for communication between two devices -- to communicate with a desktop client, you would need to replicate all of the GameKit functionality on the desktop, since there is no comparable API on the desktop. This would not be a simple undertaking.

I would highly suggest developing something over bonjour, as @Jordan suggested. Bill Dudney's project (blog article). It's a great place to start.

pixel