How to turn CBUUID into string

前端 未结 8 1053
太阳男子
太阳男子 2020-12-28 20:11

I can\'t find any official way to get a UUID string back out of a CBUUID. These UUIDs can be 2 or 16 bytes long.

The goal is to store CBUUIDs in a file somewhere as

8条回答
  •  盖世英雄少女心
    2020-12-28 20:41

    There is native method in objective C and Swift and it is quite straight forward method.

    NSString *str = characteristic.UUID.UUIDstring;
    

    Same thing with Swift language Link to library-> https://developer.apple.com/documentation/corebluetooth/cbuuid/1518742-uuidstring?language=objc

提交回复
热议问题