【问题标题】:Restricting GameKit to Bluetooth (alternative: Finding Out Whether GameKit Is Using Bluetooth or WiFi)将 GameKit 限制为蓝牙(替代方案:查明 GameKit 是使用蓝牙还是 W​​iFi)
【发布时间】:2012-12-30 12:14:57
【问题描述】:

有什么问题?

我想通过蓝牙在两个 iDevice(iPhone、iPod、iPad、iPad mini)之间进行通信。据我所知,GameKit 是 Apple 在不使用私有 API 的情况下提供的全部功能。不幸的是,AFAIK 无法将 GameKit 限制为蓝牙,因为 GameKit 自己决定是使用蓝牙还是 W​​iFi 连接连接到其他对等方。更糟糕的是,我没有找到任何方法来确定已建立的 GameKit 连接是使用蓝牙还是 W​​iFi。

问题是什么?

  • 首选:如何将 GameKit 限制为蓝牙?
  • 备选方案 1:如何确定 GameKit 连接是使用蓝牙、WiFi 还是其他方式?
  • 备选方案 2:我还可以使用什么来通过蓝牙在两个 iDevice 之间进行通信?

限制?

  • 没有私有 API,也就是 AppStore 兼容
  • 必须离线工作
  • 不限于低功耗蓝牙 4.0

【问题讨论】:

    标签: iphone objective-c ios bluetooth gamekit


    【解决方案1】:

    从 iOS 5 开始,Apple 发布了 Core Bluetooth Framework。看看那个:http://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CoreBluetooth_Framework/_index.html

    【讨论】:

    • 我知道,但打开链接并查看文档“CoreBluetooth 框架提供对蓝牙 4.0 低功耗设备的访问。”其他 iDevice 不是“蓝牙 4.0 低功耗设备”
    • 我明白了……那样的话,你为什么不用bump API来连接设备呢?对我来说效果很好! bu.mp/company/api
    • 嗯,这是一个想法,但解决方案应该离线工作:-(
    • (在问题中添加了离线要求)
    • 您应该添加(作为限制)您想在旧设备(非蓝牙 4 设备)中使用蓝牙
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-20
    相关资源
    最近更新 更多