Core Data -existingObjectWithID:error: causes error 133000

The problem is that NSManagedObjectID you pass is temporary. You can check it by calling NSManagedObjectID‘s isTemporaryID method. From docs:

Returns a Boolean value that indicates whether the
receiver is temporary.

Most object IDs return NO. New objects inserted into a
managed object context are assigned a temporary ID which is replaced
with a permanent one once the object gets saved to a persistent store.

You should first save your changes to persistent store, only then get a permanent ID to pass to other context.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)