An iPhone app as a remote control for an iPad app. Is it possible?
Ken Corey
ken at kencorey.com
Mon Jan 30 10:07:58 EST 2012
Well sending a command and getting a response is a simple enough
protocol once you're connected...but how do your devices find each other?
I'd be shocked if you could do network broadcasting using rreSocket on
an iOS device (you might actually get away with it on a desktop, but
I've not tried it). Note that with the several extremely low-cost (as
low as <$50) linux devices out or coming out soon perhaps an iPhone is a
little over-priced as a remote control?
Anyway, one way might be to let your users do the work:
You would use the function "hostNameToAddress(the address)" to find out
the address of the machine upon which the program is running, and then
show that to the user, asking them to enter it into the other device as
the target. (note that this happens on both devices). Bonus points for
saving the address so the user doesn't have to type it again.
At that point you can call the functions in rreSocket to open/write/read
to and from the socket.
Define your protocol before you start coding though, or you'll be wading
into a marsh.
FWIW,
-Ken
On 30/01/2012 14:35, paolo mazza wrote:
> My idea is as simple as this:
>
> - from a LC app in the iPhone I want to send "back"/"forward"
> commands to change the images in a LC app in the iPad.
>
> The idea is simple. The implementation probably is not so simple.
>
> I am uncomfortable with low level communications and I am looking for
> an "easy" solution.
More information about the use-livecode
mailing list