0

I have to generate a unique id for each of my core data records, is there any way to set an auto incremental index in core data? Such us pure sqlite! If not, what could be the best strategy to manage this?

Agus
  • 1,604
  • 2
  • 23
  • 48
  • possible duplicate of [Creating a unique id for a Core Data program on the iPhone](http://stackoverflow.com/questions/1351998/creating-a-unique-id-for-a-core-data-program-on-the-iphone) – TM. Apr 22 '12 at 01:23

1 Answers1

0

There is NSManagedObjectID

NSManagedObjectID *moID = [managedObject objectID];

But why not just to search? Creating a unique id for a Core Data program on the iPhone

Community
  • 1
  • 1
Nikita Pestrov
  • 5,876
  • 4
  • 31
  • 66