Instance Method

configurePersistentStoreCoordinatorForURL:ofType:error:

Configures the receiver’s persistent store coordinator for a given URL and document type.

Declaration

- (BOOL)configurePersistentStoreCoordinatorForURL:(NSURL *)url ofType:(NSString *)fileType error:(NSError * _Nullable *)error;

Parameters

url

An URL that specifies the location of the document's store.

fileType

The document type.

error

If the method does not complete successfully, upon return contains an NSError object that describes the problem.

Return Value

YES if the method completes successfully, otherwise NO.

Discussion

This method is invoked automatically when an existing document is opened. You override this method to customize creation of a persistent store for a given document or store type. You can retrieve the persistent store coordinator with the following code:

[[self managedObjectContext] persistentStoreCoordinator];

See Also