Creating a unique id for a Core Data program on the iPhone
- by Big Twisty
I am fairly new at programming in Objective-C, having been a windows programmer since I was a kid. I am falling in LOVE with it.
I am, however, having a bit of trouble figuring out this Core Data stuff. How do I create a new entry with a unique ID? In SQL I would just declare one field as an autoincrement field. I'm not seeing anything like that here, but I could just be missing something. I just want an auto incrementing NSInteger field, so when I manually add items to the database, I will have some form of reference to them.