I got confused amoung the 2 uuid's generated using two different classes (CFUUID and NSUUID). Are they both same?
According to the class documentation for UUID, they are indeed different classes (i.e. they are not toll-free bridged):
Note: The NSUUID class is not toll-free bridged with CoreFoundation’s CFUUIDRef. Use UUID string to convert between CFUUID and NSUUID, if needed. Two NSUUID objects are not guaranteed to be comparable by pointer value (as CFUUIDRef is); use isEqual: to compare two NSUUID instances.
My interpretation of this would be that they both generate a UUID which you will have to manage (storing etc). Both functions will, of course, generate different UUIDs each time you use them, so you should never have to compare the results of either (that's the point of both functions).
If you have to compare UUIDs, then you're better off doing so by converting them to strings and using them as such.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With