How to Connect iOS App to Bluetooth Button

I am new to Apple development.


I am writing an iOS app that would accept input from a Bluetooth button and perform certain actions in response to button presses.


My first question relates to which Frameworks or specific Libraries to use. For example, would the ExternalAccessory Framework be the appropriate place to look? Would it enable me to establish (or at least detect) a connection between the Bluetooth Button and my iOS device, and then interpret button presses (eg, which button, press, hold, double press, etc) and perform desired actions in response?


I am also wondering how I would determine which Bluetooth Buttons would be compatible?

For example, there are Buttons designed for Media, Home Automation, etc.

But I cant tell whether button presses on some or all of these Buttons could be intercepted by my iOS app.

Would it depend upon which Bluetooth Profile they support?


Any help to point me in the right direction would be appreciated.

Replies

The relevant frameworks are:
ExternalAccessory for MFI accessorties.

CoreBluetooth for BLE devices and for BR/EDR devices that supports GATT.


Check if the HID bluetooth profile can fit your need. In that case. If I am not mistaken you will not need to use any framework