ABAddressBook ABAddressBook Class

Definition

Provides access to the system Address Book.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.None, "Use the 'Contacts' API instead.")]
public class ABAddressBook : IDisposable, ObjCRuntime.INativeObject, System.Collections.Generic.IEnumerable<AddressBook.ABRecord>
type ABAddressBook = class
    interface INativeObject
    interface IDisposable
    interface seq<ABRecord>
    interface IEnumerable
Inheritance
ABAddressBookABAddressBook
Attributes
Implements

Remarks

The Address Book is a centralized database which stores information contacts, such as people and businesses. The notion of "groups" containing one or more contacts is also supported. ABAddressBook supports:

Constructors

ABAddressBook() ABAddressBook()

Developers should not use this deprecated constructor. Developers should use the static Create method instead

Fields

ErrorDomain ErrorDomain

Identifies the error domain under which address book errors are grouped.

Properties

GroupCount GroupCount

Gets the number of groups in the address book.

Handle Handle

Handle (pointer) to the unmanaged object representation.

HasUnsavedChanges HasUnsavedChanges

Indicates whether or not this instance has changes which haven't been saved to the global address book.

PeopleCount PeopleCount

Gets the number of ABPerson records in the address book.

Methods

Add(ABRecord) Add(ABRecord)

Adds a record to the address book.

Create(NSError) Create(NSError)
Dispose() Dispose()

Releases the resources used by the ABAddressBook object.

Dispose(Boolean) Dispose(Boolean)

Releases the resources used by the ABAddressBook object.

Finalize() Finalize()

Finalizer for the ABAddressBook object

GetAllSources() GetAllSources()

Returns all of the addresbook sources available on the system.

GetAuthorizationStatus() GetAuthorizationStatus()

What permissions the user has allowed the app.

GetDefaultSource() GetDefaultSource()

Returns the default addressbook source for the system.

GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through all records and groups in the address book.

GetGroup(Int32) GetGroup(Int32)

Returns the ABGroup with the given record ID.

GetGroups() GetGroups()

Gets all groups in the address book.

GetGroups(ABRecord) GetGroups(ABRecord)
GetPeople(ABRecord, ABPersonSortBy) GetPeople(ABRecord, ABPersonSortBy)
GetPeople() GetPeople()

Gets all people in the address book.

GetPeople(ABRecord) GetPeople(ABRecord)
GetPeopleWithName(String) GetPeopleWithName(String)

Gets all ABPerson array containing all records with a matching name.

GetPerson(Int32) GetPerson(Int32)

Returns the ABPerson with the given record ID.

GetSource(Int32) GetSource(Int32)

Returns a specific addressbook source

LocalizedLabel(NSString) LocalizedLabel(NSString)

Localize a record-property label into the current UI language.

OnExternalChange(ExternalChangeEventArgs) OnExternalChange(ExternalChangeEventArgs)

Raises the ExternalChange event.

Remove(ABRecord) Remove(ABRecord)

Removes a record from the address book.

RequestAccess(Action<Boolean,NSError>) RequestAccess(Action<Boolean,NSError>)

Presents the user with a standard permissions dialog, requesting access to the address book.

Revert() Revert()

Discards unsaved changes to the address book.

Save() Save()

Saves unsaved changes made to the current instance to the global Address Book database.

Events

ExternalChange ExternalChange

Occurs when the address book is modified.

Explicit Interface Implementations

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Returns an enumerator that iterates through all records and groups in the address book.

Applies to