Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Gamekit peer with a desktop peer

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?
like image 380
luebken Avatar asked Jun 29 '09 21:06

luebken


3 Answers

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.

like image 160
dlamblin Avatar answered Oct 20 '22 18:10

dlamblin


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.

like image 39
pixel Avatar answered Oct 20 '22 19:10

pixel


Citing Game Kit Framework Reference's Features paragraph:

Peer-to-peer connectivity allows your game to create an ad hoc Bluetooth or wireless network between multiple iPhones in the same local area. Although designed with games in mind, this network is useful for any type of data exchange among users of your app. For example, an app could use peer-to-peer connectivity to share electronic business cards or other data. This functionality is only available on iOS. You can also get the same functionality using Game Center.

like image 33
bijan Avatar answered Oct 20 '22 18:10

bijan