wifi 和 3g iPhone 和 Mac 应用程序通信
我创建了两个应用程序,一个用于 iPhone,一个用于 Mac。他们来回沟通。 iPhone 被用作“遥控器”来在我的 Mac 上做事。目前,当我按下 iphone 应用程序上的按钮时,它只会更改 mac 应用程序上文本标签的颜色。
目前只能通过wifi连接。它使用 bonjour 并查找已发现的服务器。让他们也通过 3G 进行通信涉及什么?
示例代码??有人能指出我正确的方向吗?
I created two apps, one for iphone and one for mac. They communicate back and forth. The iphone is used as a "remote control" to do things on my mac. For now it just changes the color of a text label on the mac app when I press a button on the iphone app.
As of now, it can only connect through wifi. It uses bonjour and finds discovered servers. What's involved to have them communicate through 3g as well?
Example code?? Can someone point me in the right direction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一旦你走出本地网络,事情就会变得更加复杂。它就像任何其他类型的网络路由一样。您必须知道 IP 或使用域名才能启用两个端点之间的访问。您将需要某种机制来取代 bonjour 正在做的事情,该机制将广播到更大的 Interwebs。这需要您在互联网上拥有一台服务器来促进客户端和服务器之间的通信。这被称为 PITA。 ;-)
Once you go outside the local network, things get a bit more complicated. It's like any other sort of network routing. You have to know the IP or use a domain name to enable access between the two endpoints. You will need some mechanism that replaces what bonjour is doing that will broadcast to the greater Interwebs. This would require you having a server on the Internet that would facilitate communication between clients and servers. This is known as a PITA. ;-)