We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
我知道您已经彻底放弃了 Bonjour,但您也许可以利用包装类来使其更易于管理。例如,Bill Dudney 在他的示例 Bonjour iPhone 应用程序中创建了这样的包装器(此处进行了描述)。我生成了此示例应用程序的 Mac 版本,以展示如何进行通信iPhone 和台式电脑之间。您可以在 我在 iTunes U 上的课程的网络会话中看到此操作< /a>,以及其他一些点对点通信的示例。
对于设备间的发现和通信,Bonjour 或基于它的东西(如 GameKit)将是您的最佳选择。例如,Bonjour 是通过蓝牙发现本地 iPhone 的唯一方法(GameKit 再次利用了这一点)。它还可以与 WiFi 或蓝牙透明地配合使用,因此您可以创建与网络无关的通信代码。
GameKit 在 Bonjour 之上提供了一个很好的抽象层,所以我不会立即拒绝它。如果您担心其用户界面,您可以决定不使用系统提供的 GKPeerPickerController。
I know that you've dismissed Bonjour outright, but you might be able to leverage a wrapper class to make it more manageable. For example, Bill Dudney created such a wrapper within his sample Bonjour iPhone application (described here). I generated a Mac version of this sample application to show how you can communicate between the iPhone and a desktop PC. You can see this in action in the Networking session of my class on iTunes U, as well as some other examples of peer-to-peer communication.
For device-device discovery and communication, Bonjour or something based on it (like GameKit) is going to be your best choice. Bonjour is the only way to do discovery of local iPhones over Bluetooth, for example (again, GameKit leverages this). It also works transparently with WiFi or Bluetooth, so you can create communication code that is network-agnostic.
GameKit provides a nice abstraction layer above Bonjour, so I wouldn't immediately reject it. You can decide to not use the system-supplied GKPeerPickerController if you were concerned about the user interface of this.
Dropbox 有一个 API:
https://www.dropbox.com/developers
Dropbox has an API:
https://www.dropbox.com/developers
Bonjour 可能是最好的选择。它由 Apple 支持,因此您可以信赖它在未来几年内都能正常工作,并且随着时间的推移只会变得更好。
Bonjour would probably be the best to go with. It's supported by Apple, so you can count on it working for years to come and will only get better with time.