Type Method

mergedModelFromBundles:forStoreMetadata:

Returns a merged model from a specified array for the version information in provided metadata.

Declaration

+ (NSManagedObjectModel *)mergedModelFromBundles:(NSArray<NSBundle *> *)bundles forStoreMetadata:(NSDictionary<NSString *,id> *)metadata;

Parameters

bundles

An array of bundles.

metadata

A dictionary containing version information from the metadata for a persistent store.

Return Value

The managed object model used to create the store for the metadata. If a model cannot be created to match the version information specified by metadata, returns nil.

Discussion

This method is a companion to mergedModelFromBundles:.

See Also

Initializing a Model

- initWithContentsOfURL:

Initializes the managed object model using the model file at the specified URL.

- init

Initializes an empty managed object model.

+ mergedModelFromBundles:

Returns a model created by merging all the models found in given bundles.

+ modelByMergingModels:

Creates a single model from an array of existing models.

+ modelByMergingModels:forStoreMetadata:

Returns, for the version information in given metadata, a model merged from a given array of models.