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
Bundlethat contains the xcmappingmodel file.Declaration
Swift
public let mappingModelBundle: Bundle -
Creates an
XcodeSchemaMappingProviderDeclaration
Swift
public required init(from sourceVersion: ModelVersion, to destinationVersion: ModelVersion, mappingModelBundle: Bundle)Parameters
sourceVersionthe source model version for the mapping
destinationVersionthe destination model version for the mapping
mappingModelBundlethe
Bundlethat contains the xcmappingmodel file
-
Declaration
Swift
public static func == (lhs: XcodeSchemaMappingProvider, rhs: XcodeSchemaMappingProvider) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Declaration
Swift
public func cs_createMappingModel(from sourceSchema: DynamicSchema, to destinationSchema: DynamicSchema, storage: LocalStorage) throws -> (mappingModel: NSMappingModel, migrationType: MigrationType)
View on GitHub
XcodeSchemaMappingProvider Class Reference