InferredSchemaMappingProvider

public final class InferredSchemaMappingProvider : Hashable, SchemaMappingProvider

A SchemaMappingProvider that tries to infer model migration between two DynamicSchema versions by searching all xcmappingmodels from Bundle.allBundles or by relying on lightweight migration if possible. Throws an error if lightweight migration is impossible for the two DynamicSchema. This mapping is automatically used as a fallback mapping provider, even if no mapping providers are explicitly declared in the StorageInterface.

Note

For security reasons, InferredSchemaMappingProvider will not search Bundle.allFrameworks by default. If the xcmappingmodels are bundled within a framework, use XcodeSchemaMappingProvider instead and provide Bundle(for: <a class in the framework> to its initializer.

Equatable

  • Declaration

    Swift

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

Hashable

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)

SchemaMappingProvider