Documentation Archive Developer
Search

AddressBook Changes for Swift

AddressBook

Declaration
From
enum ABAuthorizationStatus : CFIndex {
    case NotDetermined
    case Restricted
    case Denied
    case Authorized
}
To
enum ABAuthorizationStatus : CFIndex {
    case notDetermined
    case restricted
    case denied
    case authorized
}

Declaration
From
case Authorized
To
case authorized

Declaration
From
case Denied
To
case denied

Declaration
From
case NotDetermined
To
case notDetermined

Declaration
From
case Restricted
To
case restricted

Declaration
From
func ABAddressBookAddRecord(_ addressBook: ABAddressBook!, _ record: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABAddressBookAddRecord(_ addressBook: ABAddressBook!, _ record: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Declaration
From
func ABAddressBookCreateWithOptions(_ options: CFDictionary!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Unmanaged<ABAddressBook>!
To
func ABAddressBookCreateWithOptions(_ options: CFDictionary!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<ABAddressBook>!

Declaration
From
func ABAddressBookRegisterExternalChangeCallback(_ addressBook: ABAddressBook!, _ callback: ABExternalChangeCallback!, _ context: UnsafeMutablePointer<Void>)
To
func ABAddressBookRegisterExternalChangeCallback(_ addressBook: ABAddressBook!, _ callback: AddressBook.ABExternalChangeCallback!, _ context: UnsafeMutableRawPointer!)

Declaration
From
func ABAddressBookRemoveRecord(_ addressBook: ABAddressBook!, _ record: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABAddressBookRemoveRecord(_ addressBook: ABAddressBook!, _ record: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Declaration
From
typealias ABAddressBookRequestAccessCompletionHandler = (Bool, CFError!) -> Void
To
typealias ABAddressBookRequestAccessCompletionHandler = (Bool, CFError?) -> Swift.Void

Declaration
From
func ABAddressBookRequestAccessWithCompletion(_ addressBook: ABAddressBook!, _ completion: ABAddressBookRequestAccessCompletionHandler!)
To
func ABAddressBookRequestAccessWithCompletion(_ addressBook: ABAddressBook!, _ completion: AddressBook.ABAddressBookRequestAccessCompletionHandler!)

Declaration
From
func ABAddressBookSave(_ addressBook: ABAddressBook!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABAddressBookSave(_ addressBook: ABAddressBook!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Declaration
From
func ABAddressBookUnregisterExternalChangeCallback(_ addressBook: ABAddressBook!, _ callback: ABExternalChangeCallback!, _ context: UnsafeMutablePointer<Void>)
To
func ABAddressBookUnregisterExternalChangeCallback(_ addressBook: ABAddressBook!, _ callback: AddressBook.ABExternalChangeCallback!, _ context: UnsafeMutableRawPointer!)

Declaration
From
typealias ABExternalChangeCallback = (ABAddressBook!, CFDictionary!, UnsafeMutablePointer<Void>) -> Void
To
typealias ABExternalChangeCallback = (ABAddressBook?, CFDictionary?, UnsafeMutableRawPointer?) -> Swift.Void

Declaration
From
func ABGroupAddMember(_ group: ABRecord!, _ person: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABGroupAddMember(_ group: ABRecord!, _ person: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Declaration
From
func ABGroupRemoveMember(_ group: ABRecord!, _ member: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABGroupRemoveMember(_ group: ABRecord!, _ member: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Declaration
From
func ABMultiValueAddValueAndLabel(_ multiValue: ABMutableMultiValue!, _ value: AnyObject!, _ label: CFString!, _ outIdentifier: UnsafeMutablePointer<ABMultiValueIdentifier>) -> Bool
To
func ABMultiValueAddValueAndLabel(_ multiValue: ABMutableMultiValue!, _ value: CFTypeRef!, _ label: CFString!, _ outIdentifier: UnsafeMutablePointer<ABMultiValueIdentifier>!) -> Bool

Declaration
From
func ABMultiValueCopyValueAtIndex(_ multiValue: ABMultiValue!, _ index: CFIndex) -> Unmanaged<AnyObject>!
To
func ABMultiValueCopyValueAtIndex(_ multiValue: ABMultiValue!, _ index: CFIndex) -> Unmanaged<CFTypeRef>!

Declaration
From
func ABMultiValueGetFirstIndexOfValue(_ multiValue: ABMultiValue!, _ value: AnyObject!) -> CFIndex
To
func ABMultiValueGetFirstIndexOfValue(_ multiValue: ABMultiValue!, _ value: CFTypeRef!) -> CFIndex

Declaration
From
func ABMultiValueInsertValueAndLabelAtIndex(_ multiValue: ABMutableMultiValue!, _ value: AnyObject!, _ label: CFString!, _ index: CFIndex, _ outIdentifier: UnsafeMutablePointer<ABMultiValueIdentifier>) -> Bool
To
func ABMultiValueInsertValueAndLabelAtIndex(_ multiValue: ABMutableMultiValue!, _ value: CFTypeRef!, _ label: CFString!, _ index: CFIndex, _ outIdentifier: UnsafeMutablePointer<ABMultiValueIdentifier>!) -> Bool

Declaration
From
func ABMultiValueReplaceValueAtIndex(_ multiValue: ABMutableMultiValue!, _ value: AnyObject!, _ index: CFIndex) -> Bool
To
func ABMultiValueReplaceValueAtIndex(_ multiValue: ABMutableMultiValue!, _ value: CFTypeRef!, _ index: CFIndex) -> Bool

Declaration
From
typealias ABMutableMultiValueRef = ABMutableMultiValue
To
typealias ABMutableMultiValue = CFTypeRef

Declaration
From
func ABPersonRemoveImageData(_ person: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABPersonRemoveImageData(_ person: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Declaration
From
func ABPersonSetImageData(_ person: ABRecord!, _ imageData: CFData!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABPersonSetImageData(_ person: ABRecord!, _ imageData: CFData!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Declaration
From
func ABRecordCopyValue(_ record: ABRecord!, _ property: ABPropertyID) -> Unmanaged<AnyObject>!
To
func ABRecordCopyValue(_ record: ABRecord!, _ property: ABPropertyID) -> Unmanaged<CFTypeRef>!

Declaration
From
func ABRecordRemoveValue(_ record: ABRecord!, _ property: ABPropertyID, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABRecordRemoveValue(_ record: ABRecord!, _ property: ABPropertyID, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Declaration
From
func ABRecordSetValue(_ record: ABRecord!, _ property: ABPropertyID, _ value: AnyObject!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
To
func ABRecordSetValue(_ record: ABRecord!, _ property: ABPropertyID, _ value: CFTypeRef!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool