CSMigrationResult
@objc
public final class CSMigrationResult : NSObject, CoreStoreObjectiveCType
The CSMigrationResult serves as the Objective-C bridging type for MigrationResult.
See also
MigrationResult
-
YESif the migration succeeded,NOotherwiseDeclaration
Swift
@objc public var isSuccess: Bool { get } -
YESif the migration failed,NOotherwiseDeclaration
Swift
@objc public var isFailure: Bool { get } -
YESif the migration succeeded,NOotherwiseDeclaration
Swift
@objc public var migrationTypes: [CSMigrationType]? { get } -
The
NSErrorfor a failed migration, ornilif the migration succeededDeclaration
Swift
@objc public var error: NSError? { get } -
If the result was a success, the
successblock is executed with an array ofCSMigrationTypes that indicates the migration steps completed. If the result was a failure, thefailureblock is executed with anNSErrorargument pertaining to the actual error.The blocks are executed immediately as
@noescapeand will not be retained.Declaration
Swift
@objc public func handleSuccess(_ success: (_ migrationTypes: [CSMigrationType]) -> Void, failure: (_ error: NSError) -> Void)Parameters
successthe block to execute on success. The block passes an array of
CSMigrationTypes that indicates the migration steps completed.failurethe block to execute on failure. The block passes an
NSErrorargument that pertains to the actual error. -
If the result was a success, the
successblock is executed with an array ofCSMigrationTypes that indicates the migration steps completed. If the result was a failure, this method does nothing.The block is executed immediately as
@noescapeand will not be retained.Declaration
Swift
@objc public func handleSuccess(_ success: (_ migrationTypes: [CSMigrationType]) -> Void)Parameters
successthe block to execute on success. The block passes an array of
CSMigrationTypes that indicates the migration steps completed. -
If the result was a failure, the
failureblock is executed with anNSErrorargument pertaining to the actual error. If the result was a success, this method does nothing.The block is executed immediately as
@noescapeand will not be retained.Declaration
Swift
@objc public func handleFailure(_ failure: (_ error: NSError) -> Void)Parameters
failurethe block to execute on failure. The block passes an
NSErrorargument that pertains to the actual error.
-
Declaration
Swift
public let bridgeToSwift: MigrationResult -
Declaration
Swift
public required init(_ swiftValue: MigrationResult)
View on GitHub
CSMigrationResult Class Reference