Documentation Archive Developer
Search

DiskArbitration Changes for Swift

DiskArbitration

Removed DAApprovalSessionCreate(_: CFAllocator!) -> Unmanaged<DAApprovalSession>!
Removed DAApprovalSessionGetTypeID() -> CFTypeID
Removed DAApprovalSessionRef
Removed DAApprovalSessionScheduleWithRunLoop(_: DAApprovalSession!, _: CFRunLoop!, _: CFString!)
Removed DAApprovalSessionUnscheduleFromRunLoop(_: DAApprovalSession!, _: CFRunLoop!, _: CFString!)
Removed DAUnregisterApprovalCallback(_: DASession!, _: UnsafeMutablePointer<Void>, _: UnsafeMutablePointer<Void>)
Declaration
From
typealias DADiskAppearedCallback = CFunctionPointer<((DADisk!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskAppearedCallback = (DADisk, UnsafeMutablePointer<Void>) -> Void

Declaration
From
func DADiskClaim(_ disk: DADisk!, _ options: DADiskClaimOptions, _ release: DADiskClaimReleaseCallback, _ releaseContext: UnsafeMutablePointer<Void>, _ callback: DADiskClaimCallback, _ callbackContext: UnsafeMutablePointer<Void>)
To
func DADiskClaim(_ disk: DADisk, _ options: DADiskClaimOptions, _ release: DADiskClaimReleaseCallback?, _ releaseContext: UnsafeMutablePointer<Void>, _ callback: DADiskClaimCallback?, _ callbackContext: UnsafeMutablePointer<Void>)

Declaration
From
typealias DADiskClaimCallback = CFunctionPointer<((DADisk!, DADissenter!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskClaimCallback = (DADisk, DADissenter?, UnsafeMutablePointer<Void>) -> Void

Declaration
From
typealias DADiskClaimReleaseCallback = CFunctionPointer<((DADisk!, UnsafeMutablePointer<Void>) -> Unmanaged<DADissenter>!)>
To
typealias DADiskClaimReleaseCallback = (DADisk, UnsafeMutablePointer<Void>) -> Unmanaged<DADissenter>?

Declaration
From
func DADiskCopyDescription(_ disk: DADisk!) -> Unmanaged<CFDictionary>!
To
func DADiskCopyDescription(_ disk: DADisk) -> CFDictionary?

Declaration
From
func DADiskCopyIOMedia(_ disk: DADisk!) -> io_service_t
To
func DADiskCopyIOMedia(_ disk: DADisk) -> io_service_t

Declaration
From
func DADiskCopyWholeDisk(_ disk: DADisk!) -> Unmanaged<DADisk>!
To
func DADiskCopyWholeDisk(_ disk: DADisk) -> DADisk?

Declaration
From
func DADiskCreateFromBSDName(_ allocator: CFAllocator!, _ session: DASession!, _ name: UnsafePointer<Int8>) -> Unmanaged<DADisk>!
To
func DADiskCreateFromBSDName(_ allocator: CFAllocator?, _ session: DASession, _ name: UnsafePointer<Int8>) -> DADisk?

Declaration
From
func DADiskCreateFromIOMedia(_ allocator: CFAllocator!, _ session: DASession!, _ media: io_service_t) -> Unmanaged<DADisk>!
To
func DADiskCreateFromIOMedia(_ allocator: CFAllocator?, _ session: DASession, _ media: io_service_t) -> DADisk?

Declaration
From
func DADiskCreateFromVolumePath(_ allocator: CFAllocator!, _ session: DASession!, _ path: CFURL!) -> Unmanaged<DADisk>!
To
func DADiskCreateFromVolumePath(_ allocator: CFAllocator?, _ session: DASession, _ path: CFURL) -> DADisk?

Declaration
From
typealias DADiskDescriptionChangedCallback = CFunctionPointer<((DADisk!, CFArray!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskDescriptionChangedCallback = (DADisk, CFArray, UnsafeMutablePointer<Void>) -> Void

Declaration
From
typealias DADiskDisappearedCallback = CFunctionPointer<((DADisk!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskDisappearedCallback = (DADisk, UnsafeMutablePointer<Void>) -> Void

Declaration
From
func DADiskEject(_ disk: DADisk!, _ options: DADiskEjectOptions, _ callback: DADiskEjectCallback, _ context: UnsafeMutablePointer<Void>)
To
func DADiskEject(_ disk: DADisk, _ options: DADiskEjectOptions, _ callback: DADiskEjectCallback?, _ context: UnsafeMutablePointer<Void>)

Declaration
From
typealias DADiskEjectApprovalCallback = CFunctionPointer<((DADisk!, UnsafeMutablePointer<Void>) -> Unmanaged<DADissenter>!)>
To
typealias DADiskEjectApprovalCallback = (DADisk, UnsafeMutablePointer<Void>) -> Unmanaged<DADissenter>?

Declaration
From
typealias DADiskEjectCallback = CFunctionPointer<((DADisk!, DADissenter!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskEjectCallback = (DADisk, DADissenter?, UnsafeMutablePointer<Void>) -> Void

Declaration
From
func DADiskGetBSDName(_ disk: DADisk!) -> UnsafePointer<Int8>
To
func DADiskGetBSDName(_ disk: DADisk) -> UnsafePointer<Int8>

Declaration
From
func DADiskGetOptions(_ disk: DADisk!) -> DADiskOptions
To
func DADiskGetOptions(_ disk: DADisk) -> DADiskOptions

Declaration
From
func DADiskIsClaimed(_ disk: DADisk!) -> Boolean
To
func DADiskIsClaimed(_ disk: DADisk) -> Bool

Declaration
From
func DADiskMount(_ disk: DADisk!, _ path: CFURL!, _ options: DADiskMountOptions, _ callback: DADiskMountCallback, _ context: UnsafeMutablePointer<Void>)
To
func DADiskMount(_ disk: DADisk, _ path: CFURL?, _ options: DADiskMountOptions, _ callback: DADiskMountCallback?, _ context: UnsafeMutablePointer<Void>)

Declaration
From
typealias DADiskMountApprovalCallback = CFunctionPointer<((DADisk!, UnsafeMutablePointer<Void>) -> Unmanaged<DADissenter>!)>
To
typealias DADiskMountApprovalCallback = (DADisk, UnsafeMutablePointer<Void>) -> Unmanaged<DADissenter>?

Declaration
From
typealias DADiskMountCallback = CFunctionPointer<((DADisk!, DADissenter!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskMountCallback = (DADisk, DADissenter?, UnsafeMutablePointer<Void>) -> Void

Declaration
From
func DADiskMountWithArguments(_ disk: DADisk!, _ path: CFURL!, _ options: DADiskMountOptions, _ callback: DADiskMountCallback, _ context: UnsafeMutablePointer<Void>, _ arguments: UnsafeMutablePointer<Unmanaged<CFString>?>)
To
func DADiskMountWithArguments(_ disk: DADisk, _ path: CFURL?, _ options: DADiskMountOptions, _ callback: DADiskMountCallback?, _ context: UnsafeMutablePointer<Void>, _ arguments: UnsafeMutablePointer<Unmanaged<CFString>?>)

Declaration
From
typealias DADiskPeekCallback = CFunctionPointer<((DADisk!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskPeekCallback = (DADisk, UnsafeMutablePointer<Void>) -> Void

Declaration
From
func DADiskRename(_ disk: DADisk!, _ name: CFString!, _ options: DADiskRenameOptions, _ callback: DADiskRenameCallback, _ context: UnsafeMutablePointer<Void>)
To
func DADiskRename(_ disk: DADisk, _ name: CFString, _ options: DADiskRenameOptions, _ callback: DADiskRenameCallback?, _ context: UnsafeMutablePointer<Void>)

Declaration
From
typealias DADiskRenameCallback = CFunctionPointer<((DADisk!, DADissenter!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskRenameCallback = (DADisk, DADissenter?, UnsafeMutablePointer<Void>) -> Void

Declaration
From
func DADiskSetOptions(_ disk: DADisk!, _ options: DADiskOptions, _ value: Boolean) -> DAReturn
To
func DADiskSetOptions(_ disk: DADisk, _ options: DADiskOptions, _ value: Bool) -> DAReturn

Declaration
From
func DADiskUnclaim(_ disk: DADisk!)
To
func DADiskUnclaim(_ disk: DADisk)

Declaration
From
func DADiskUnmount(_ disk: DADisk!, _ options: DADiskUnmountOptions, _ callback: DADiskUnmountCallback, _ context: UnsafeMutablePointer<Void>)
To
func DADiskUnmount(_ disk: DADisk, _ options: DADiskUnmountOptions, _ callback: DADiskUnmountCallback?, _ context: UnsafeMutablePointer<Void>)

Declaration
From
typealias DADiskUnmountApprovalCallback = CFunctionPointer<((DADisk!, UnsafeMutablePointer<Void>) -> Unmanaged<DADissenter>!)>
To
typealias DADiskUnmountApprovalCallback = (DADisk, UnsafeMutablePointer<Void>) -> Unmanaged<DADissenter>?

Declaration
From
typealias DADiskUnmountCallback = CFunctionPointer<((DADisk!, DADissenter!, UnsafeMutablePointer<Void>) -> Void)>
To
typealias DADiskUnmountCallback = (DADisk, DADissenter?, UnsafeMutablePointer<Void>) -> Void

Declaration
From
func DADissenterCreate(_ allocator: CFAllocator!, _ status: DAReturn, _ string: CFString!) -> Unmanaged<DADissenter>!
To
func DADissenterCreate(_ allocator: CFAllocator?, _ status: DAReturn, _ string: CFString?) -> DADissenter

Declaration
From
func DADissenterGetStatus(_ dissenter: DADissenter!) -> DAReturn
To
func DADissenterGetStatus(_ dissenter: DADissenter) -> DAReturn

Declaration
From
func DADissenterGetStatusString(_ dissenter: DADissenter!) -> Unmanaged<CFString>!
To
func DADissenterGetStatusString(_ dissenter: DADissenter) -> CFString?

Declaration
From
func DARegisterDiskAppearedCallback(_ session: DASession!, _ match: CFDictionary!, _ callback: DADiskAppearedCallback, _ context: UnsafeMutablePointer<Void>)
To
func DARegisterDiskAppearedCallback(_ session: DASession, _ match: CFDictionary?, _ callback: DADiskAppearedCallback, _ context: UnsafeMutablePointer<Void>)

Declaration
From
func DARegisterDiskDescriptionChangedCallback(_ session: DASession!, _ match: CFDictionary!, _ watch: CFArray!, _ callback: DADiskDescriptionChangedCallback, _ context: UnsafeMutablePointer<Void>)
To
func DARegisterDiskDescriptionChangedCallback(_ session: DASession, _ match: CFDictionary?, _ watch: CFArray?, _ callback: DADiskDescriptionChangedCallback, _ context: UnsafeMutablePointer<Void>)

Declaration
From
func DARegisterDiskDisappearedCallback(_ session: DASession!, _ match: CFDictionary!, _ callback: DADiskDisappearedCallback, _ context: UnsafeMutablePointer<Void>)
To
func DARegisterDiskDisappearedCallback(_ session: DASession, _ match: CFDictionary?, _ callback: DADiskDisappearedCallback, _ context: UnsafeMutablePointer<Void>)

Declaration
From
func DARegisterDiskEjectApprovalCallback(_ session: DASession!, _ match: CFDictionary!, _ callback: DADiskEjectApprovalCallback, _ context: UnsafeMutablePointer<Void>)
To
func DARegisterDiskEjectApprovalCallback(_ session: DASession, _ match: CFDictionary?, _ callback: DADiskEjectApprovalCallback, _ context: UnsafeMutablePointer<Void>)

Declaration
From
func DARegisterDiskMountApprovalCallback(_ session: DASession!, _ match: CFDictionary!, _ callback: DADiskMountApprovalCallback, _ context: UnsafeMutablePointer<Void>)
To
func DARegisterDiskMountApprovalCallback(_ session: DASession, _ match: CFDictionary?, _ callback: DADiskMountApprovalCallback, _ context: UnsafeMutablePointer<Void>)

Declaration
From
func DARegisterDiskPeekCallback(_ session: DASession!, _ match: CFDictionary!, _ order: CFIndex, _ callback: DADiskPeekCallback, _ context: UnsafeMutablePointer<Void>)
To
func DARegisterDiskPeekCallback(_ session: DASession, _ match: CFDictionary?, _ order: CFIndex, _ callback: DADiskPeekCallback, _ context: UnsafeMutablePointer<Void>)

Declaration
From
func DARegisterDiskUnmountApprovalCallback(_ session: DASession!, _ match: CFDictionary!, _ callback: DADiskUnmountApprovalCallback, _ context: UnsafeMutablePointer<Void>)
To
func DARegisterDiskUnmountApprovalCallback(_ session: DASession, _ match: CFDictionary?, _ callback: DADiskUnmountApprovalCallback, _ context: UnsafeMutablePointer<Void>)

Declaration
From
func DASessionCreate(_ allocator: CFAllocator!) -> Unmanaged<DASession>!
To
func DASessionCreate(_ allocator: CFAllocator?) -> DASession?

Declaration
From
func DASessionScheduleWithRunLoop(_ session: DASession!, _ runLoop: CFRunLoop!, _ runLoopMode: CFString!)
To
func DASessionScheduleWithRunLoop(_ session: DASession, _ runLoop: CFRunLoop, _ runLoopMode: CFString)

Declaration
From
func DASessionSetDispatchQueue(_ session: DASession!, _ queue: dispatch_queue_t!)
To
func DASessionSetDispatchQueue(_ session: DASession, _ queue: dispatch_queue_t?)

Declaration
From
func DASessionUnscheduleFromRunLoop(_ session: DASession!, _ runLoop: CFRunLoop!, _ runLoopMode: CFString!)
To
func DASessionUnscheduleFromRunLoop(_ session: DASession, _ runLoop: CFRunLoop, _ runLoopMode: CFString)

Declaration
From
func DAUnregisterCallback(_ session: DASession!, _ callback: UnsafeMutablePointer<Void>, _ context: UnsafeMutablePointer<Void>)
To
func DAUnregisterCallback(_ session: DASession, _ callback: UnsafeMutablePointer<Void>, _ context: UnsafeMutablePointer<Void>)

Declaration
From
let kDADiskDescriptionBusNameKey: CFString!
To
let kDADiskDescriptionBusNameKey: CFString

Declaration
From
let kDADiskDescriptionBusPathKey: CFString!
To
let kDADiskDescriptionBusPathKey: CFString

Declaration
From
let kDADiskDescriptionDeviceGUIDKey: CFString!
To
let kDADiskDescriptionDeviceGUIDKey: CFString

Declaration
From
let kDADiskDescriptionDeviceInternalKey: CFString!
To
let kDADiskDescriptionDeviceInternalKey: CFString

Declaration
From
let kDADiskDescriptionDeviceModelKey: CFString!
To
let kDADiskDescriptionDeviceModelKey: CFString

Declaration
From
let kDADiskDescriptionDevicePathKey: CFString!
To
let kDADiskDescriptionDevicePathKey: CFString

Declaration
From
let kDADiskDescriptionDeviceProtocolKey: CFString!
To
let kDADiskDescriptionDeviceProtocolKey: CFString

Declaration
From
let kDADiskDescriptionDeviceRevisionKey: CFString!
To
let kDADiskDescriptionDeviceRevisionKey: CFString

Declaration
From
let kDADiskDescriptionDeviceUnitKey: CFString!
To
let kDADiskDescriptionDeviceUnitKey: CFString

Declaration
From
let kDADiskDescriptionDeviceVendorKey: CFString!
To
let kDADiskDescriptionDeviceVendorKey: CFString

Declaration
From
var kDADiskDescriptionMatchMediaUnformatted: Unmanaged<CFDictionary>!
To
var kDADiskDescriptionMatchMediaUnformatted: Unmanaged<CFDictionary>

Declaration
From
var kDADiskDescriptionMatchMediaWhole: Unmanaged<CFDictionary>!
To
var kDADiskDescriptionMatchMediaWhole: Unmanaged<CFDictionary>

Declaration
From
var kDADiskDescriptionMatchVolumeMountable: Unmanaged<CFDictionary>!
To
var kDADiskDescriptionMatchVolumeMountable: Unmanaged<CFDictionary>

Declaration
From
var kDADiskDescriptionMatchVolumeUnrecognized: Unmanaged<CFDictionary>!
To
var kDADiskDescriptionMatchVolumeUnrecognized: Unmanaged<CFDictionary>

Declaration
From
let kDADiskDescriptionMediaBlockSizeKey: CFString!
To
let kDADiskDescriptionMediaBlockSizeKey: CFString

Declaration
From
let kDADiskDescriptionMediaBSDMajorKey: CFString!
To
let kDADiskDescriptionMediaBSDMajorKey: CFString

Declaration
From
let kDADiskDescriptionMediaBSDMinorKey: CFString!
To
let kDADiskDescriptionMediaBSDMinorKey: CFString

Declaration
From
let kDADiskDescriptionMediaBSDNameKey: CFString!
To
let kDADiskDescriptionMediaBSDNameKey: CFString

Declaration
From
let kDADiskDescriptionMediaBSDUnitKey: CFString!
To
let kDADiskDescriptionMediaBSDUnitKey: CFString

Declaration
From
let kDADiskDescriptionMediaContentKey: CFString!
To
let kDADiskDescriptionMediaContentKey: CFString

Declaration
From
let kDADiskDescriptionMediaEjectableKey: CFString!
To
let kDADiskDescriptionMediaEjectableKey: CFString

Declaration
From
let kDADiskDescriptionMediaIconKey: CFString!
To
let kDADiskDescriptionMediaIconKey: CFString

Declaration
From
let kDADiskDescriptionMediaKindKey: CFString!
To
let kDADiskDescriptionMediaKindKey: CFString

Declaration
From
let kDADiskDescriptionMediaLeafKey: CFString!
To
let kDADiskDescriptionMediaLeafKey: CFString

Declaration
From
let kDADiskDescriptionMediaNameKey: CFString!
To
let kDADiskDescriptionMediaNameKey: CFString

Declaration
From
let kDADiskDescriptionMediaPathKey: CFString!
To
let kDADiskDescriptionMediaPathKey: CFString

Declaration
From
let kDADiskDescriptionMediaRemovableKey: CFString!
To
let kDADiskDescriptionMediaRemovableKey: CFString

Declaration
From
let kDADiskDescriptionMediaSizeKey: CFString!
To
let kDADiskDescriptionMediaSizeKey: CFString

Declaration
From
let kDADiskDescriptionMediaTypeKey: CFString!
To
let kDADiskDescriptionMediaTypeKey: CFString

Declaration
From
let kDADiskDescriptionMediaUUIDKey: CFString!
To
let kDADiskDescriptionMediaUUIDKey: CFString

Declaration
From
let kDADiskDescriptionMediaWholeKey: CFString!
To
let kDADiskDescriptionMediaWholeKey: CFString

Declaration
From
let kDADiskDescriptionMediaWritableKey: CFString!
To
let kDADiskDescriptionMediaWritableKey: CFString

Declaration
From
let kDADiskDescriptionVolumeKindKey: CFString!
To
let kDADiskDescriptionVolumeKindKey: CFString

Declaration
From
let kDADiskDescriptionVolumeMountableKey: CFString!
To
let kDADiskDescriptionVolumeMountableKey: CFString

Declaration
From
let kDADiskDescriptionVolumeNameKey: CFString!
To
let kDADiskDescriptionVolumeNameKey: CFString

Declaration
From
let kDADiskDescriptionVolumeNetworkKey: CFString!
To
let kDADiskDescriptionVolumeNetworkKey: CFString

Declaration
From
let kDADiskDescriptionVolumePathKey: CFString!
To
let kDADiskDescriptionVolumePathKey: CFString

Declaration
From
let kDADiskDescriptionVolumeUUIDKey: CFString!
To
let kDADiskDescriptionVolumeUUIDKey: CFString

Declaration
From
var kDADiskDescriptionWatchVolumeName: Unmanaged<CFArray>!
To
var kDADiskDescriptionWatchVolumeName: Unmanaged<CFArray>

Declaration
From
var kDADiskDescriptionWatchVolumePath: Unmanaged<CFArray>!
To
var kDADiskDescriptionWatchVolumePath: Unmanaged<CFArray>