开发者

Sending data between OSX and iPhones/iPads

I am wondering how I can send data between a machine and a mobile device. I know about the game kit an have read a bit about bonjour (but don't know to much about it), but would like to know some expert thoughts on what the best way is.

What I basically want to build is a one 开发者_如何转开发way traffic application that sends data from OSX to the mobile device (iPhone, iPod touch or iPad). The data send is either pictures, text (of a certain size and position ect) or video. The mobile device just has to receive this data and display it... nothing more. My guess is that a WiFi solution would be best.

How could I best do this? Are there any tutorials that might help me putting this together?

Thanks in advance!

Best regards,

Paul Peelen


As no reply yet . . .

Bonjour is more focused on LAN networks, so would restrict you to WiFi.

It's also more of a service discovery standard - your Mac app would advertise the service on the LAN, and clients could see it - but your actual app communications will run on a different TCP socket, using whatever protocol is appropriate.

This linked answer may be helpful (although you will want CFNetwork in reverse - pushing from Mac to phone)

[iPhone]: How send output stream via wireless network?

For video you are probably better off looking for higher level frameworks (i.e. the AV ones).

Without knowing the full details of what you want to do, I wonder if rather than pushing data to the iPhone, the best thing would be to send a lightweight notification to the iPhone (AMQP, XMPP, or similar protocol) passing a URL back to the resource on the Mac - that way you could use standard HTTP GET for images, video, etc, on the iPhone side, throw the URL at a webkit view to display - and on your Mac side you could then use an off-the-shelf web server (Apache, or an embedded HTTP server within your code).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜