Possibly not really a true answer, but too much for a comment...
You should always check the return from
save:
, and then examine the error.If you have an error saving the MOC, do you really want to continue using the object?
You should be using
existingObjectWithID:error:
instead ofobjectWithID:
because the former returnsnil
if it can't be found, and anNSError
indicating why.objectWithID:
will always return an object... as a fault if it can't be found.
Now, this does not explain why you see the differences in iOS6/7, but I've moved on from iOS6, and can't remember all the notes I had from issues using the MOC hierarchy... and there were a lot of them in iOS5 and iOS6...
So, I suggest using existingObjectWithID:error:
which should return a reasonable error as to why the object is not being retrieved in iOS6... maybe that will lead you to an immediate solution... or it may give you more information to add to the question.