XcodeSchemaMappingProvider

public final class XcodeSchemaMappingProvider : Hashable, SchemaMappingProvider

A SchemaMappingProvider that tries to infer model migration between two DynamicSchema versions by loading an xcmappingmodel file from the specified Bundle. Throws CoreStoreError.mappingModelNotFound if the xcmappingmodel file cannot be found, or if the xcmappingmodel doesn’t resolve the source and destination DynamicSchema.

  • The source model version for the mapping.

    Declaration

    Swift

    public let sourceVersion: ModelVersion
  • The destination model version for the mapping.

    Declaration

    Swift

    public let destinationVersion: ModelVersion
  • The Bundle that contains the xcmappingmodel file.

    Declaration

    Swift

    public let mappingModelBundle: Bundle
  • Creates an XcodeSchemaMappingProvider

    Declaration

    Swift

    public required init(from sourceVersion: ModelVersion, to destinationVersion: ModelVersion, mappingModelBundle: Bundle)

    Parameters

    sourceVersion

    the source model version for the mapping

    destinationVersion

    the destination model version for the mapping

    mappingModelBundle

    the Bundle that contains the xcmappingmodel file

Equatable

  • Declaration

    Swift

    public static func == (lhs: XcodeSchemaMappingProvider, rhs: XcodeSchemaMappingProvider) -> Bool

Hashable

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)

SchemaMappingProvider