Create iOS BLE HID service?

2019-02-17 03:24发布

问题:

I tried to create a simple "Hello World" app implementing the HID service (i.e. my app acting as a simple HID button).

However, when trying this I receive the error The specified UUID is not allowed for this operation after adding my service to my CBPeripheralManager instance. Adding any "generic" (random UUID) service works, and other builtins such as Heart Rate monitor works fine, but I was curious about the HID service in particular.

I found this thread, indicating that support for HID has been changed (but this seems to be on the central side, which makes more sense since HID is natively supported in iOS7).

The documentation fails to mention that any services should be unsupported. Could it be that Apple removed HID peripheral support in iOS7? If so, is this documented somewhere?

回答1:

I am going to answer my own question and hopefully help others with the same problem. I went to the source and asked Apple's tech support. HID support is intentionally reserved for iOS, and they will update the documentation to clarify this.

This means that it is not possible to create HID peripherals from iOS apps in iOS 7.

Now I know.