Contents

init(editing:migrationPlan:editor:prepareDocument:)

Instantiates a document group for creating and editing documents described by the last Schema in the migration plan.

Declaration

init(editing contentType: UTType, migrationPlan: any SchemaMigrationPlan.Type, editor: @escaping () -> Content, prepareDocument: @escaping (ModelContext) -> Void = { _ in })

Parameters

  • editing:

    The content type of the document. It should conform to UTType.package.

  • migrationPlan:

    The description of steps required to migrate older document versions so that they can be opened and edited. The last VersionedSchema in the plan is considered to be the current application schema.

  • editor:

    The editing UI for the provided document.

See Also

Editing a document backed by a persistent store