Search code examples
iphonesqliteioscore-data

Get last inserted item from Core Data, iOS


is there a way to get the last inserted item in a core data database?


Solution

  • This returns the very last inserted object.

    setFetchLimit:1 and setFetchOffset:[number of all entries - 1]