views:

55

answers:

1

Hey guys,

I'm looking to start a new application up - the concept's really simple I guess.

You press a button labelled '1' on the iPhone and it sends a message to the PC or Mac that makes the mac/PC respond exactly as if the number '1' had been pressed on the computer's own keyboard.

Now I think I'm going to have to do some serious reading around on this one and I'm happy to put that in so I'm not looking for a "Oh this is the answer" response, but can someone offer me some help to get me going in the right direction, I'm aware of applications such as Rowmote that essentially do this already and that they have their own desktop based client's - where do I start looking into how to do this? Published books, online guides etc are all great ways to start looking into this but does anyone know which ones? Any help much appreciated.

+3  A: 

This are a couple main concepts at work here:

  1. Connecting two wireless devices. For this you'll need NSNetService and NSNetServiceBrowser, which are the two main classes involved in Bonjour networking. You could use another communication setup, but Bonjour will probably be the least painful. A really useful guide to getting started with this is available here.
  2. Simulating key events on the Mac. CGEventPost() is a really useful function for doing this.
Dave DeLong
Thanks for the reply. Even at a basic level this sounds logical to me. I shall look into it tonight more fully. In spite of this answer I must say I'm very much a paper man when it comes to reading - are there any good books out tehre that anyone knows of that cover this sort of thing?Also following on, does Bonjour work the same on Mac OS X and Windows? Ideally it would be nice to look at a similar implementation for both platforms if at all possible.
David26th