Class ABAddressBook

All Implemented Interfaces:
AutoCloseable

public class ABAddressBook
extends CFType
  • Constructor Details

    • ABAddressBook

      public ABAddressBook()
  • Method Details

    • registerExternalChangeCallback

      public void registerExternalChangeCallback​(ABAddressBook.ExternalChangeCallback callback)
    • unregisterExternalChangeCallback

      public void unregisterExternalChangeCallback​(ABAddressBook.ExternalChangeCallback callback)
    • getLocalizedLabel

      public static String getLocalizedLabel​(ABPropertyLabel label)
    • getAuthorizationStatus

      @Deprecated public static ABAuthorizationStatus getAuthorizationStatus()
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore authorizationStatusForEntityType:]
    • create

      @Deprecated public static ABAddressBook create​(NSDictionary options) throws NSErrorException
      Deprecated.
      Deprecated in iOS 9.0. use [[CNContactStore alloc] init]
      Throws:
      NSErrorException
    • create

      @Deprecated public static ABAddressBook create()
      Deprecated.
      Deprecated in iOS 9.0. use [[CNContactStore alloc] init]
    • requestAccess

      @Deprecated public void requestAccess​(ABAddressBook.RequestAccessCompletionHandler completion)
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore requestAccessForEntityType:completionHandler:]
    • save

      @Deprecated public boolean save() throws NSErrorException
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore executeSaveRequest:error:]
      Throws:
      NSErrorException
    • hasUnsavedChanges

      @Deprecated public boolean hasUnsavedChanges()
      Deprecated.
      Deprecated in iOS 9.0.
    • addRecord

      @Deprecated public boolean addRecord​(ABRecord record) throws NSErrorException
      Deprecated.
      Deprecated in iOS 9.0. use CNSaveRequest
      Throws:
      NSErrorException
    • removeRecord

      @Deprecated public boolean removeRecord​(ABRecord record) throws NSErrorException
      Deprecated.
      Deprecated in iOS 9.0. use CNSaveRequest
      Throws:
      NSErrorException
    • getLocalizedLabel

      @Deprecated public static String getLocalizedLabel​(String label)
      Deprecated.
      Deprecated in iOS 9.0. use [CNLabeledValue localizedStringForLabel:]
    • registerExternalChangeCallback

      @Deprecated protected void registerExternalChangeCallback​(FunctionPtr callback, long context)
      Deprecated.
      Deprecated in iOS 9.0. use CNContactStoreDidChangeNotification
    • unregisterExternalChangeCallback

      @Deprecated protected void unregisterExternalChangeCallback​(FunctionPtr callback, long context)
      Deprecated.
      Deprecated in iOS 9.0.
    • revert

      @Deprecated public void revert()
      Deprecated.
      Deprecated in iOS 9.0. refetch CN objects
    • getDefaultSource

      @Deprecated public ABSource getDefaultSource()
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore containersMatchingPredicate:[CNContainer predicateForContainersWithIdentifiers: @[CNContactStore.defaultContainerIdentifier]] error:]
    • getSource

      @Deprecated public ABSource getSource​(int sourceID)
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore containersMatchingPredicate:[CNContainer predicateForContainersWithIdentifiers:] error:]
    • getAllSources

      @Deprecated public List<ABSource> getAllSources()
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore containersMatchingPredicate:nil error:]
    • getPersonCount

      @Deprecated public long getPersonCount()
      Deprecated.
      Deprecated in iOS 9.0. use count of fetch results for CNContactFetchRequest with predicate = nil
    • getPerson

      @Deprecated public ABPerson getPerson​(int recordID)
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore unifiedContactWithIdentifier:keysToFetch:error:]
    • getAllPeople

      @Deprecated public List<ABPerson> getAllPeople()
      Deprecated.
      Deprecated in iOS 9.0. use CNContactFetchRequest with predicate = nil
    • getAllPeopleInSource

      @Deprecated public List<ABPerson> getAllPeopleInSource​(ABSource source)
      Deprecated.
      Deprecated in iOS 9.0. use CNContactFetchRequest with predicate = [CNContact predicateForContactsInContainerWithIdentifier:] and unifyResults = NO
    • getAllPeopleInSource

      @Deprecated public List<ABPerson> getAllPeopleInSource​(ABSource source, ABPersonSortOrdering sortOrdering)
      Deprecated.
      Deprecated in iOS 9.0. use CNContactFetchRequest with predicate = [CNContact predicateForContactsInContainerWithIdentifier:] and unifyResults = NO and sortOrder
    • getPeople

      @Deprecated public List<ABPerson> getPeople​(String name)
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore unifiedContactsMatchingPredicate:[CNContact predicateForContactsMatchingName:] keysToFetch: error:]
    • getGroup

      @Deprecated public ABGroup getGroup​(int recordID)
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore groupsMatchingPredicate:[CNGroup predicateForGroupsWithIdentifiers:] error:]
    • getGroupCount

      @Deprecated public long getGroupCount()
      Deprecated.
      Deprecated in iOS 9.0. use count of fetch results for [CNContactStore groupsMatchingPredicate:nil error:]
    • getAllGroups

      @Deprecated public List<ABGroup> getAllGroups()
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore groupsMatchingPredicate:nil error:]
    • getAllGroupsInSource

      @Deprecated public List<ABGroup> getAllGroupsInSource​(ABSource source)
      Deprecated.
      Deprecated in iOS 9.0. use [CNContactStore groupsMatchingPredicate:[CNGroup predicateForGroupsInContainerWithIdentifier:] error:]