Set auto increment in Core data iOS

Core Data does not have an auto-increment feature. The fact that it uses SQLite internally is mostly irrelevant-- if you focus on SQL-like details, you'll get Core Data badly wrong.

If you want an incrementing field, you'll have to manage it yourself. You can save the current value in your app's NSUserDefaults. Or you could put it in the metadata for the persistent store file that Core Data uses (see methods on NSPersistentStoreCoordinator). Either is fine, just make sure to look it up, increment it, and re-save it when you create a new object.

But you probably don't need this field. Core Data already handles unique IDs for each managed object-- see NSManagedObjectID.