English 中文(简体)
Secure iPhone-Desktop Connection
原标题:

Background

There are a lot of App Store released iPhone apps that require an IP based server on the desktop so that the iPhone can connect to the desktop as a client. For example, there are many programs that emulate a keyboard, touchpad, or Apple remote on the iPhone so that a desktop computer can be controlled over wifi. However, many of these applications get around writing their own server by requiring the user to install some VNC server variant.

Question

What is the best way to implement a secure (encrypted) IP server on a desktop (Mac and Windows platforms) that allows for simple two way message passing between itself and an iPhone client on a wifi network?

Sample Use Case

An event on the desktop causes the desktop to push a small image or text to the iPhone. An event on the iPhone causes a short text message to be pushed to the desktop. Any single event can happen at any time (doesn t appear synchronized to the user).

1st Follow-Up Question

Would this type of project be best handled using something like XML or JSON over HTTP? Or is there a better protocol, like BEEP or Bonjour(XMPP)?

最佳回答

What is the best way to implement a secure (encrypted) IP server on a desktop (Mac and Windows platforms) that allows for simple two way message passing between itself and an iPhone client on a wifi network?

Not sure if there is a "best" way, but much code is already available to do xyz-over-HTTPS (TLS/SSL). In that case, the "xyz" can be any web-based message exchange protocol, such as XML, JSON, etc. via REST or SOAP, etc.

问题回答

If you want to be able to push events to a non-jailbroken iPhone you can t do it other than via Apple s Push Server which causes a notification to the client program if it is running or otherwise displays an alert of some kind to the user.

Typical architecture has those notifications handled by the client program as an indication it should go and get some data from the server - Apple insist we do not regard the notifications as trusted delivery.

I suggest a read of this article on using Bonjour and local networking, whilst it s iPhone to iPhone it should apply to desktop OS/X also.





相关问题
how to represent it in dtd?

I have two element action and guid. guid is a required field when action is add. but when action is del it will not appear in file. How to represent this in dtd ?

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

XStream serializing collections

I have a class structure that I would like to serialize with Xstream. The root class contains a collection of other objects (of varying types). I would like to only serialize part of the objects that ...

MS Word splits words in its XML format

I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word ...

Merging an XML file with a list of changes

I have two XML files that are generated by another application I have no control over. The first is a settings file, and the second is a list of changes that should be applied to the first. Main ...

How do I check if a node has no siblings?

I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here s what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

热门标签