init(name:managedObjectModel:)
Create a container with the specified name and managed object model.
Declaration
init(name: String, managedObjectModel model: NSManagedObjectModel)Parameters
- name:
The name used by the persistent container.
- model:
The managed object model to be used by the persistent container.
Return Value
A persistent container initialized with the given name and model.
Discussion
By default, the provided name value of the container is used as the name of the persisent store associated with the container. Passing in the NSManagedObjectModel object overrides the lookup of the model by the provided name value.