问题
I have added a custom characteristic to a service using the HomeKit Simulator. However when I add it, despite I include the manufactorer description, a UUID is shown instead of the description.
How can I display the description instead?
The first characteristic is a standard one ("On/Off": boolean). The other ones are custom.
回答1:
Until now the HomeKit Accessory Simulator (1.1) cannot be configured to show manufacturer description, as you want to.
At least in version 1.1 custom services can be attached and achieve a corresponding name, that the developer is able to distinguish. Characteristics can still not be named and remains a UUID mess. But as far as I know, this version (1.1) is only rolled out to MFi participants.
回答2:
You can add a manufacturer description to the characteristic.
Then after you add it will show like this
In your app, you can check first if there is a manufacturer description like this
let manufacturerDescription = characteristic.metadata?.manufacturerDescription
来源:https://stackoverflow.com/questions/29752463/homekit-simulator-adding-human-readable-description-to-custom-service-character