added utility to get NSManagedObjectID from an object URI

This commit is contained in:
John Estropia
2015-08-19 15:07:15 +09:00
parent b92ee76907
commit 5a96ef13f6

View File

@@ -89,6 +89,14 @@ public final class DataStack {
return self.model.entityMapping()
}
/**
Returns the `NSManagedObjectID` for the specified object URI if it exists in the persistent store.
*/
public func objectIDForURIRepresentation(url: NSURL) -> NSManagedObjectID? {
return self.coordinator.managedObjectIDForURIRepresentation(url)
}
/**
Adds an in-memory store to the stack.