Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 06-20-2010, 01:34 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 2
LastLine is on a distinguished road
Default Communicate a message from iphone to Mac/PC

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.
LastLine is offline   Reply With Quote
Old 06-22-2010, 09:30 AM   #2 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,002
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by LastLine View Post
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.
TCP socket connections are the usual way to do this. The problem you'll face is that most users don't have a dedicated IP address, and those that do are frequently behind a firewall.

If you have a dedicated server then both the iPhone and the desktop apps can connect to the server, exchange IP addresses, and then establish a peer-to-peer connection.

There are also other options like AIM, or Apples new (not-yet-released) game system, but each of those has it's pros and cons.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 06-22-2010, 11:41 AM   #3 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,586
JasonR is on a distinguished road
Default

This link will get you started on Bonjour between a Mac and an iPhone: Cocoa for Scientists (Part XXVIII): Bonjour and How Do You Do? | MacResearch. Bonjour is an easy way for your iPhone client and Mac server to find each other. There's also an SDK for Bonjour on Windows: Open Source - Apple Developer
JasonR is offline   Reply With Quote
Old 06-22-2010, 03:02 PM   #4 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,002
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by JasonR View Post
This link will get you started on Bonjour between a Mac and an iPhone: Cocoa for Scientists (Part XXVIII): Bonjour and How Do You Do? | MacResearch. Bonjour is an easy way for your iPhone client and Mac server to find each other. There's also an SDK for Bonjour on Windows: Open Source - Apple Developer
I'm pretty sure Bonjour only works for computers that are on the same LAN. I assumed the OP wanted a solution when computers were at different locations using different connections to the internet. Things are more complicated in that case.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 370
9 members and 361 guests
.Snipe, AragornSG, baja_yu, ChrisYates, davejas69, guusleijsten, hussain1982, Kryckter, stanny
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,645
Threads: 94,111
Posts: 402,862
Top Poster: BrianSlick (7,990)
Welcome to our newest member, leighec68
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:37 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0