Returns the object for the specified ID or nil if the object does not exist.
- iOS 3.0+
- macOS 10.6+
- tvOS 9.0+
- watchOS 2.0+
- Core Data
The object ID for the requested object.
If there is a problem in retrieving the object specified by
object, upon return contains an error that describes the problem.
The object specified by
object. If the object cannot be fetched, or does not exist, or cannot be faulted, it returns
If there is a managed object with the given ID already registered in the context, that object is returned directly; otherwise the corresponding object is faulted into the context.
This method might perform I/O if the data is uncached.
object(with:), this method never returns a fault.