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
iOS 7.1 (beta released yesterday, 11/18/13) introduced the following property on CBUUID
:
@property(nonatomic, readonly) NSString *UUIDString
The UUID represented as a string. (read-only)
From CBUUID Class Reference.
It's also worth noting that for comparing a UUID string with a CBUUID
, this works:
if ([cbuuidInQuestion isEqual:[CBUUID UUIDWithString:@"1234-5678-9012-1234"]]) {
// isEqual tests for "the same UUID"
// == tests for "the same CBUUID object"
}