iPhone 和 iPhone 之间的临时 Wifi 连接麦克-可能吗?
我只是想知道是否可以使用 iPhone 和 Mac 上的 Wifi 硬件在两个设备上建立数据传输隧道?我的主要目标是通过应用程序沿着临时 WiFi 连接将数据从 iPhone 传输到 Mac。如果您还有其他方法想要建议,请提出。
期待您的回复。
谢谢!
AK
I was just wondering if it is possible to set up a data transfer tunnel between an iPhone and a Mac using the Wifi hardware present on both devices? My main objective is to transfer data from my iPhone to my Mac through an app along an ad hoc wifi connection. If there are any other methods you would like to suggest, then please do.
Looking forward to your replies.
Thanks!
A.K.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以通过
NSNetServices
和CFNetServices
API 使用 Bonjour。基本上:
You can make use of Bonjour, via
NSNetServices
andCFNetServices
APIs.Basically:
您还不能自动执行此操作。也就是说,您必须手动创建临时首先在 Mac 上连接无线网络(Apple 的说法是“计算机到计算机网络”),然后将 iPhone 连接到该网络,就像任何其他 WiFi 网络一样。之后,上面建议的方法就可以正常工作了。
我认为您所建议的(也称为 WiFi Direct)是一种非常新的规范,iPhone 或 OS X 尚未支持(截至撰写本文时)。
You cannot automagically do this, yet. That is, you must manually create the ad hoc wireless network (a "computer-to-computer network" in Apple parlance) first on the Mac, then join the iPhone to it just like any other WiFi network. After this, the methods suggested above will work just fine.
What I think you are suggesting, also known as WiFi Direct, is a very new specification that is not yet supported by the iPhone or OS X (as of this writing).
您可能希望查看 NSNetServices/CFNetServices (Bonjour) 中的通用 API 来完成此类连接。
You'd probably want to look at NSNetServices/CFNetServices (Bonjour) for a common API to accomplish that sort of connection.