Search code examples
objective-ctype-conversionbluetooth-lowenergyuuidnsnumber

How to Convert NSNumber to CBUUID in Objective C


I have a device UDID which is a NSNumber.

I need to convert it to CBUUID.

How can I convert?


Solution

  • NSNumber *aNumber = @123456;   
    CBUUID *cUUID = [CBUUID UUIDWithString:[aNumber stringValue]];