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
otherwiseDeclaration
Swift
@objc public var isSuccess: Bool { get }
-
YES
if the migration failed,NO
otherwiseDeclaration
Swift
@objc public var isFailure: Bool { get }
-
YES
if the migration succeeded,NO
otherwiseDeclaration
Swift
@objc public var migrationTypes: [CSMigrationType]? { get }
-
The
NSError
for a failed migration, ornil
if the migration succeededDeclaration
Swift
@objc public var error: NSError? { get }
-
If the result was a success, the
success
block is executed with an array ofCSMigrationType
s that indicates the migration steps completed. If the result was a failure, thefailure
block is executed with anNSError
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
CSMigrationType
s 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 ofCSMigrationType
s 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
CSMigrationType
s that indicates the migration steps completed. -
If the result was a failure, the
failure
block is executed with anNSError
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.
-
Declaration
Swift
public let bridgeToSwift: MigrationResult
-
Declaration
Swift
public required init(_ swiftValue: MigrationResult)