Search code examples
iphoneobjective-cipadiosbonjour

Mirror commands in an iOS application on two devices using bonjour


I would like to have a feature within an application whereby another user running the same app can take over "control" of the interface.

Specifically an iPad application with a scrollable/zoomable view. So if one user pinch-zooms or scrolls the interface on the other users iPad mirrors exactly the same set of commands - hopefully with the nice apple functionality such as bounce at the end of the scroll etc. A small delay ~1sec is not a major problem in the movements but that they traverse the same path and end up in the same position is critical.

I was hoping to do this without the need for any server component so was planning to use Bonjour.

Does anyone have any tips on whether this would be possible using Bonjour? And also they best way to send pinch-zoom and scroll commands so that both applications state stay in sync.


Solution

  • I think the "Game Kit" would be your best bet. It is used to throw together ad-hoc connections between two devices - giving them a data-pipe for messaging, etc - which you'd use for doing things like playing multiplayer games.

    It sounds like what you want to do is perhaps capture (respond to) "raw" events - send them over the pipe - and "re-post" them remotely.