init(for:migrationPlan:configurations:)
Creates a model container using the specified model types, migration plan, and zero or more configurations.
Declaration
convenience init(for forTypes: any PersistentModel.Type..., migrationPlan: (any SchemaMigrationPlan.Type)? = nil, configurations: ModelConfiguration...) throwsParameters
- forTypes:
A list of the persistent model types that comprise your app’s schema.
- migrationPlan:
A plan that describes the evolution of your app’s schema and how the container migrates between specific versions. For more information, see Schemamigrationplan.
- configurations:
A list configurations that describe how the container manages the persisted data for specific groups of models. For more information, see Modelconfiguration.