Instance Method

loadPersistentStoresWithCompletionHandler:

Instructs the persistent container to load the persistent stores.

Declaration

- (void)loadPersistentStoresWithCompletionHandler:(void (^)(NSPersistentStoreDescription *, NSError *))block;

Parameters

block

Once the loading of the persistent stores has completed, this block will be executed on the calling thread.

Discussion

Once the persistent container has been initialized, you need to execute loadPersistentStoresWithCompletionHandler: to instruct the container to load the persistent stores and complete the creation of the Core Data stack.

Once the completion handler has fired, the stack is fully initialized and is ready for use. The completion handler will be called once for each persistent store that is created.

If there is an error in the loading of the persistent stores, the NSError value will be populated.

See Also

Configuring a Container

persistentStoreDescriptions

The persistent store descriptions used to create the persistent stores referenced by this persistent container.

managedObjectModel

The model associated with this persistent container. (read-only)

name

The name of this persistent container. (read-only)

persistentStoreCoordinator

The persistent store coordinator associated with this persistent container. (read-only)