I’d like to add a unique ID field to my managed object entity model.
I know that Core Data doesn’t use ID relationships but this is different. I need a way of passing thread safe data to a different thread so that the new thread can then fetch the managed object from that data.
It can be in any format but ideally just a single object/variable/value.
I could add a CFUUID to the object as an NSString but I’m not sure if this is ideal? Should I be doing something else?
Any alternatives are welcome, or even just confirmation that CFUUID is the way to go.
as @Carl Veazey mention it:
The
NSManagedObjectIDis exactly what are you searching for!and here ist a short snippet: