任何可以在两个 iphone/ipod touch/ipad 之间共享数据的 API?(除了 GameKit) [英] Any API to share data between two iphones/ipod touches/ipads? (Except GameKit)

查看:19
本文介绍了任何可以在两个 iphone/ipod touch/ipad 之间共享数据的 API?(除了 GameKit)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何框架/api 可以轻松找到其他设备并在它们之间共享数据?

is there any framework/api to easily to find other devices and share data between them?

请不要使用游戏套件.bonjour 会很棒,但构建起来很复杂......也许有任何使用 Bonjour 的 API?

Not gamekit please. And bonjour would be great but it is to complex to build..Mayby there's any API that uses Bonjour?

是否有任何基于 Bonjour 的 API/框架?

Is there any API/Framework that is based on Bonjour?

推荐答案

我知道您已经彻底放弃了 Bonjour,但您或许可以利用包装类使其更易于管理.例如,Bill Dudney 在他的示例 Bonjour iPhone 应用程序中创建了这样一个包装器(在此处 进行了描述).我生成了一个 此示例应用程序的 Mac 版本 来展示您如何进行通信在 iPhone 和台式 PC 之间.您可以在 我在 iTunes U 上的课程,以及其他一些点对点通信的例子.

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.

对于设备-设备发现和通信,Bonjour 或基于它的东西(如 GameKit)将是您的最佳选择.例如,Bonjour 是通过蓝牙发现本地 iPhone 的唯一方法(同样,GameKit 利用了这一点).它还可以通过 WiFi 或蓝牙透明地工作,因此您可以创建与网络无关的通信代码.

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 在 Bonjour 之上提供了一个很好的抽象层,所以我不会立即拒绝它.如果您担心它的用户界面,您可以决定不使用系统提供的 GKPeerPickerController.

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.

这篇关于任何可以在两个 iphone/ipod touch/ipad 之间共享数据的 API?(除了 GameKit)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆