Instance Method


Loads the cache nodes for the receiver.


- (BOOL)load:(NSError * _Nullable *)error;



If an error occurs, upon return contains an NSError object that describes the problem.

Return Value

YES if the cache nodes were loaded correctly, otherwise NO.


You override this method to to load the data from the URL specified in initWithPersistentStoreCoordinator:configurationName:URL:options: and create cache nodes for the represented objects. You must respect the configuration specified for the store, as well as the options.

Any subclass of NSAtomicStore must be able to handle being initialized with a URL pointing to a zero-length file. This serves as an indicator that a new store is to be constructed at the specified location and allows you to securely create reservation files in known locations which can then be passed to Core Data to construct stores. You may choose to create zero-length reservation files during initWithPersistentStoreCoordinator:configurationName:URL:options: or load:. If you do so, you must remove the reservation file if the store is removed from the coordinator before it is saved.

Special Considerations

You must override this method.

See Also

Loading a Store

- objectIDForEntity:referenceObject:

Returns a managed object ID from the reference data for a specified entity.

- addCacheNodes:

Registers a set of cache nodes with the receiver.