I have a list objects from coredata and then I get objectId from one of those objects:
let fetchedId = poi.objectID.URIRepresentation()
Now
What you get is not the object ID, but the URI. The object ID is a part of the URI. You can ask the persistent store coordinator for the object ID with
- managedObjectIDForURIRepresentation:
. Having the object ID you can get the object from the context using for example -objectWithID:
. But please look to the documentation, of this methods for some reasons.