How to turn CBUUID into string

前端 未结 8 1074
太阳男子
太阳男子 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:59

    I know it's been 7 month since it was asked and answered, but... CBUUID is “toll-free bridged” to CFUUID and the easiest way to convert is

     //CBUUID* uuid = descr.UUID;
     NSString* str = CFUUIDCreateString(nil, uuid);
    

提交回复
热议问题