I'm going to be generating CFUUID objects (if there's a better way to create a GUID on iOS, let me know) that need to be persisted using Core Data. There is no GUID data type in Core Data. What's the preferred type? It looks like CFUUID objects easily convert to and from a string, so I'm thinking that. Another option might be Binary Data.
Another consideration is that these GUIDs will going into and coming out of JSON objects (using built-in iOS5 JSON Serialization via NSJSONSerialization).
If I were doing it, I would just store it as a string.
You could store it as binary data, but since it's going to be going into and coming out of a string (which is what JSON is represented with) it's probably easier to store it as a string and not worry about converting it backwards and forwards.
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