Initializer

init(name:)

Initializes a persistent container with the given name.

Declaration

convenience init(name: String)

Parameters

name

The name of the NSPersistentContainer object.

Return Value

A persistent container initialized with the given name.

Discussion

By default, the provided name value is used to name the persistent store and is used to look up the name of the NSManagedObjectModel object to be used with the NSPersistentContainer object.

See Also

Creating a Container

init(name: String, managedObjectModel: NSManagedObjectModel)

Initializes a persistent container with the given name and model.