How to use bluetooth classic instead of le

前端 未结 2 1014
走了就别回头了
走了就别回头了 2020-11-29 06:51

In reference to Dennis Mathews answer how do you specify bluetooth classic instead of LE on iOS? Is there a different api from Core Bluetooth Framework?

2条回答
  •  一生所求
    2020-11-29 07:31

    Joels there is a very clear way to use Bluetooth classic on iOS. It is with the External Accessory framework (it also includes direct hardware connections in addition to Bluetooth classic however).

    You need to add the ExternalAccessory.framework and specify "App communicates with an accessory" in the required background modes inside your plist to get started. It should be noted however that with Bluetooth classic, the user must add your Bluetooth device from the System Bluetooth settings. It is only with Bluetooth LE that we are able to add devices from the app side.

    Check out the docs on the External Accessory Framework

    In response to your question regarding the MFi program, this should clarify:

    I want to develop an iOS app that communicates with an MFi accessory. Do I need to join the MFi Program? No. iOS app developers do not need to join the MFi Program. Everything app developers need is in the External Accessory Framework, which is provided in the iOS SDK. To access the iOS SDK, please join the iOS Developer Program: https://developer.apple.com/programs/ios/.

    If you'd like to learn more, consult the MFi FAQ

提交回复
热议问题