CSMigrationResult

@objc
public final class CSMigrationResult : NSObject, CoreStoreObjectiveCType

The CSMigrationResult serves as the Objective-C bridging type for MigrationResult.

See also

MigrationResult
  • YES if the migration succeeded, NO otherwise

    Declaration

    Swift

    @objc
    public var isSuccess: Bool { get }
  • YES if the migration failed, NO otherwise

    Declaration

    Swift

    @objc
    public var isFailure: Bool { get }
  • YES if the migration succeeded, NO otherwise

    Declaration

    Swift

    @objc
    public var migrationTypes: [CSMigrationType]? { get }
  • The NSError for a failed migration, or nil if the migration succeeded

    Declaration

    Swift

    @objc
    public var error: NSError? { get }
  • If the result was a success, the success block is executed with an array of CSMigrationTypes that indicates the migration steps completed. If the result was a failure, the failure block is executed with an NSError argument pertaining to the actual error.

    The blocks are executed immediately as @noescape and will not be retained.

    Declaration

    Swift

    @objc
    public func handleSuccess(_ success: (_ migrationTypes: [CSMigrationType]) -> Void, failure: (_ error: NSError) -> Void)

    Parameters

    success

    the block to execute on success. The block passes an array of CSMigrationTypes that indicates the migration steps completed.

    failure

    the block to execute on failure. The block passes an NSError argument that pertains to the actual error.

  • If the result was a success, the success block is executed with an array of CSMigrationTypes that indicates the migration steps completed. If the result was a failure, this method does nothing.

    The block is executed immediately as @noescape and will not be retained.

    Declaration

    Swift

    @objc
    public func handleSuccess(_ success: (_ migrationTypes: [CSMigrationType]) -> Void)

    Parameters

    success

    the 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 failure block is executed with an NSError argument pertaining to the actual error. If the result was a success, this method does nothing.

    The block is executed immediately as @noescape and will not be retained.

    Declaration

    Swift

    @objc
    public func handleFailure(_ failure: (_ error: NSError) -> Void)

    Parameters

    failure

    the block to execute on failure. The block passes an NSError argument that pertains to the actual error.