Documentation Archive Developer
Search

Contacts Changes for Swift

Contacts

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified CNContact
DeclarationProtocols
From
class CNContact : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSCoding {
    var identifier: String { get }
    var contactType: CNContactType { get }
    var namePrefix: String { get }
    var givenName: String { get }
    var middleName: String { get }
    var familyName: String { get }
    var previousFamilyName: String { get }
    var nameSuffix: String { get }
    var nickname: String { get }
    var phoneticGivenName: String { get }
    var phoneticMiddleName: String { get }
    var phoneticFamilyName: String { get }
    var organizationName: String { get }
    var departmentName: String { get }
    var jobTitle: String { get }
    var note: String { get }
    @NSCopying var imageData: NSData? { get }
    @NSCopying var thumbnailImageData: NSData? { get }
    var imageDataAvailable: Bool { get }
    var phoneNumbers: [CNLabeledValue] { get }
    var emailAddresses: [CNLabeledValue] { get }
    var postalAddresses: [CNLabeledValue] { get }
    var urlAddresses: [CNLabeledValue] { get }
    var contactRelations: [CNLabeledValue] { get }
    var socialProfiles: [CNLabeledValue] { get }
    var instantMessageAddresses: [CNLabeledValue] { get }
    @NSCopying var birthday: NSDateComponents? { get }
    @NSCopying var nonGregorianBirthday: NSDateComponents? { get }
    var dates: [CNLabeledValue] { get }
    func isKeyAvailable(_ key: String) -> Bool
    func areKeysAvailable(_ keyDescriptors: [CNKeyDescriptor]) -> Bool
    class func localizedStringForKey(_ key: String) -> String
    class func comparatorForNameSortOrder(_ sortOrder: CNContactSortOrder) -> NSComparator
    class func descriptorForAllComparatorKeys() -> CNKeyDescriptor
    func isUnifiedWithContactWithIdentifier(_ contactIdentifier: String) -> Bool
}
extension CNContact {
    class func predicateForContactsMatchingName(_ name: String) -> NSPredicate
    class func predicateForContactsWithIdentifiers(_ identifiers: [String]) -> NSPredicate
    class func predicateForContactsInGroupWithIdentifier(_ groupIdentifier: String) -> NSPredicate
    class func predicateForContactsInContainerWithIdentifier(_ containerIdentifier: String) -> NSPredicate
}
AnyObject, NSCoding, NSCopying, NSMutableCopying, NSSecureCoding
To
class CNContact : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
    var identifier: String { get }
    var contactType: CNContactType { get }
    var namePrefix: String { get }
    var givenName: String { get }
    var middleName: String { get }
    var familyName: String { get }
    var previousFamilyName: String { get }
    var nameSuffix: String { get }
    var nickname: String { get }
    var phoneticGivenName: String { get }
    var phoneticMiddleName: String { get }
    var phoneticFamilyName: String { get }
    var organizationName: String { get }
    var departmentName: String { get }
    var jobTitle: String { get }
    var note: String { get }
    @NSCopying var imageData: NSData? { get }
    @NSCopying var thumbnailImageData: NSData? { get }
    var imageDataAvailable: Bool { get }
    var phoneNumbers: [CNLabeledValue] { get }
    var emailAddresses: [CNLabeledValue] { get }
    var postalAddresses: [CNLabeledValue] { get }
    var urlAddresses: [CNLabeledValue] { get }
    var contactRelations: [CNLabeledValue] { get }
    var socialProfiles: [CNLabeledValue] { get }
    var instantMessageAddresses: [CNLabeledValue] { get }
    @NSCopying var birthday: NSDateComponents? { get }
    @NSCopying var nonGregorianBirthday: NSDateComponents? { get }
    var dates: [CNLabeledValue] { get }
    func isKeyAvailable(_ key: String) -> Bool
    func areKeysAvailable(_ keyDescriptors: [CNKeyDescriptor]) -> Bool
    class func localizedStringForKey(_ key: String) -> String
    class func comparatorForNameSortOrder(_ sortOrder: CNContactSortOrder) -> NSComparator
    class func descriptorForAllComparatorKeys() -> CNKeyDescriptor
    func isUnifiedWithContactWithIdentifier(_ contactIdentifier: String) -> Bool
}
extension CNContact {
    class func predicateForContactsMatchingName(_ name: String) -> NSPredicate
    class func predicateForContactsWithIdentifiers(_ identifiers: [String]) -> NSPredicate
    class func predicateForContactsInGroupWithIdentifier(_ groupIdentifier: String) -> NSPredicate
    class func predicateForContactsInContainerWithIdentifier(_ containerIdentifier: String) -> NSPredicate
}
NSCopying, NSMutableCopying, NSSecureCoding

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

DeclarationProtocols
From
class CNContactProperty : NSObject, NSCopying, NSSecureCoding, NSCoding {
    @NSCopying var contact: CNContact { get }
    var key: String { get }
    var value: AnyObject? { get }
    var identifier: String? { get }
    var label: String? { get }
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CNContactProperty : NSObject, NSCopying, NSSecureCoding {
    @NSCopying var contact: CNContact { get }
    var key: String { get }
    var value: AnyObject? { get }
    var identifier: String? { get }
    var label: String? { get }
}
NSCopying, NSSecureCoding

DeclarationProtocols
From
class CNContactRelation : NSObject, NSCopying, NSSecureCoding, NSCoding {
    convenience init(name name: String)
    class func contactRelationWithName(_ name: String) -> Self
    init(name name: String)
    var name: String { get }
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CNContactRelation : NSObject, NSCopying, NSSecureCoding {
    convenience init(name name: String)
    class func contactRelationWithName(_ name: String) -> Self
    init(name name: String)
    var name: String { get }
}
NSCopying, NSSecureCoding

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject
To--

Modified CNContainer
DeclarationProtocols
From
class CNContainer : NSObject, NSCopying, NSSecureCoding, NSCoding {
    var identifier: String { get }
    var name: String { get }
    var type: CNContainerType { get }
}
extension CNContainer {
    class func predicateForContainersWithIdentifiers(_ identifiers: [String]) -> NSPredicate
    class func predicateForContainerOfContactWithIdentifier(_ contactIdentifier: String) -> NSPredicate
    class func predicateForContainerOfGroupWithIdentifier(_ groupIdentifier: String) -> NSPredicate
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CNContainer : NSObject, NSCopying, NSSecureCoding {
    var identifier: String { get }
    var name: String { get }
    var type: CNContainerType { get }
}
extension CNContainer {
    class func predicateForContainersWithIdentifiers(_ identifiers: [String]) -> NSPredicate
    class func predicateForContainerOfContactWithIdentifier(_ contactIdentifier: String) -> NSPredicate
    class func predicateForContainerOfGroupWithIdentifier(_ groupIdentifier: String) -> NSPredicate
}
NSCopying, NSSecureCoding

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

DeclarationProtocols
From
enum CNErrorCode : Int {
    case CommunicationError
    case DataAccessError
    case AuthorizationDenied
    case RecordDoesNotExist
    case InsertedRecordAlreadyExists
    case ContainmentCycle
    case ContainmentScope
    case ParentRecordDoesNotExist
    case ValidationMultipleErrors
    case ValidationTypeMismatch
    case ValidationConfigurationError
    case PredicateInvalid
    case PolicyViolation
}
extension CNErrorCode : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
extension CNErrorCode : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
Equatable, ErrorType, Hashable, RawRepresentable
To
enum CNErrorCode : Int {
    case CommunicationError
    case DataAccessError
    case AuthorizationDenied
    case RecordDoesNotExist
    case InsertedRecordAlreadyExists
    case ContainmentCycle
    case ContainmentScope
    case ParentRecordDoesNotExist
    case ValidationMultipleErrors
    case ValidationTypeMismatch
    case ValidationConfigurationError
    case PredicateInvalid
    case PolicyViolation
}
extension CNErrorCode : _BridgedNSError {
}
extension CNErrorCode : _BridgedNSError {
}
--

Modified CNGroup
DeclarationProtocols
From
class CNGroup : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSCoding {
    var identifier: String { get }
    var name: String { get }
}
extension CNGroup {
    class func predicateForGroupsWithIdentifiers(_ identifiers: [String]) -> NSPredicate
    class func predicateForSubgroupsInGroupWithIdentifier(_ parentGroupIdentifier: String) -> NSPredicate
    class func predicateForGroupsInContainerWithIdentifier(_ containerIdentifier: String) -> NSPredicate
}
AnyObject, NSCoding, NSCopying, NSMutableCopying, NSSecureCoding
To
class CNGroup : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
    var identifier: String { get }
    var name: String { get }
}
extension CNGroup {
    class func predicateForGroupsWithIdentifiers(_ identifiers: [String]) -> NSPredicate
    class func predicateForSubgroupsInGroupWithIdentifier(_ parentGroupIdentifier: String) -> NSPredicate
    class func predicateForGroupsInContainerWithIdentifier(_ containerIdentifier: String) -> NSPredicate
}
NSCopying, NSMutableCopying, NSSecureCoding

DeclarationProtocols
From
class CNInstantMessageAddress : NSObject, NSCopying, NSSecureCoding, NSCoding {
    var username: String { get }
    var service: String { get }
    init(username username: String, service service: String)
    class func localizedStringForKey(_ key: String) -> String
    class func localizedStringForService(_ service: String) -> String
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CNInstantMessageAddress : NSObject, NSCopying, NSSecureCoding {
    var username: String { get }
    var service: String { get }
    init(username username: String, service service: String)
    class func localizedStringForKey(_ key: String) -> String
    class func localizedStringForService(_ service: String) -> String
}
NSCopying, NSSecureCoding

Modified CNKeyDescriptor
DeclarationProtocols
From
protocol CNKeyDescriptor : NSObjectProtocol, NSSecureCoding, NSCoding, NSCopying {
}
NSCoding, NSCopying, NSObjectProtocol, NSSecureCoding
To
protocol CNKeyDescriptor : NSObjectProtocol, NSSecureCoding, NSCopying {
}
NSCopying, NSObjectProtocol, NSSecureCoding

DeclarationProtocols
From
class CNLabeledValue : NSObject, NSCopying, NSSecureCoding, NSCoding {
    var identifier: String { get }
    var label: String { get }
    @NSCopying var value: protocol<NSCopying, NSSecureCoding> { get }
    convenience init(label label: String?, value value: protocol<NSCopying, NSSecureCoding>)
    class func labeledValueWithLabel(_ label: String?, value value: protocol<NSCopying, NSSecureCoding>) -> Self
    init(label label: String?, value value: protocol<NSCopying, NSSecureCoding>)
    func labeledValueBySettingLabel(_ label: String?) -> Self
    func labeledValueBySettingValue(_ value: protocol<NSCopying, NSSecureCoding>) -> Self
    func labeledValueBySettingLabel(_ label: String?, value value: protocol<NSCopying, NSSecureCoding>) -> Self
    class func localizedStringForLabel(_ label: String) -> String
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CNLabeledValue : NSObject, NSCopying, NSSecureCoding {
    var identifier: String { get }
    var label: String { get }
    @NSCopying var value: protocol<NSCopying, NSSecureCoding> { get }
    convenience init(label label: String?, value value: protocol<NSCopying, NSSecureCoding>)
    class func labeledValueWithLabel(_ label: String?, value value: protocol<NSCopying, NSSecureCoding>) -> Self
    init(label label: String?, value value: protocol<NSCopying, NSSecureCoding>)
    func labeledValueBySettingLabel(_ label: String?) -> Self
    func labeledValueBySettingValue(_ value: protocol<NSCopying, NSSecureCoding>) -> Self
    func labeledValueBySettingLabel(_ label: String?, value value: protocol<NSCopying, NSSecureCoding>) -> Self
    class func localizedStringForLabel(_ label: String) -> String
}
NSCopying, NSSecureCoding

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Modified CNPhoneNumber
DeclarationProtocols
From
class CNPhoneNumber : NSObject, NSCopying, NSSecureCoding, NSCoding {
    convenience init(stringValue stringValue: String)
    class func phoneNumberWithStringValue(_ stringValue: String) -> Self
    init(stringValue string: String)
    var stringValue: String { get }
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CNPhoneNumber : NSObject, NSCopying, NSSecureCoding {
    convenience init(stringValue stringValue: String)
    class func phoneNumberWithStringValue(_ stringValue: String) -> Self
    init(stringValue string: String)
    var stringValue: String { get }
}
NSCopying, NSSecureCoding

DeclarationProtocols
From
class CNPostalAddress : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSCoding {
    var street: String { get }
    var city: String { get }
    var state: String { get }
    var postalCode: String { get }
    var country: String { get }
    var ISOCountryCode: String { get }
    class func localizedStringForKey(_ key: String) -> String
}
AnyObject, NSCoding, NSCopying, NSMutableCopying, NSSecureCoding
To
class CNPostalAddress : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
    var street: String { get }
    var city: String { get }
    var state: String { get }
    var postalCode: String { get }
    var country: String { get }
    var ISOCountryCode: String { get }
    class func localizedStringForKey(_ key: String) -> String
}
NSCopying, NSMutableCopying, NSSecureCoding

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified CNSaveRequest
Protocols
FromAnyObject
To--

DeclarationProtocols
From
class CNSocialProfile : NSObject, NSCopying, NSSecureCoding, NSCoding {
    var urlString: String { get }
    var username: String { get }
    var userIdentifier: String { get }
    var service: String { get }
    init(urlString urlString: String?, username username: String?, userIdentifier userIdentifier: String?, service service: String?)
    class func localizedStringForKey(_ key: String) -> String
    class func localizedStringForService(_ service: String) -> String
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CNSocialProfile : NSObject, NSCopying, NSSecureCoding {
    var urlString: String { get }
    var username: String { get }
    var userIdentifier: String { get }
    var service: String { get }
    init(urlString urlString: String?, username username: String?, userIdentifier userIdentifier: String?, service service: String?)
    class func localizedStringForKey(_ key: String) -> String
    class func localizedStringForService(_ service: String) -> String
}
NSCopying, NSSecureCoding