---
title: ABAddressBook
framework: addressbook
role: symbol
role_heading: Class
path: addressbook/abaddressbook
---

# ABAddressBook

The main object you use to access the Address Book database.

## Declaration

```swift
class ABAddressBook
```

## Overview

Overview The ABAddressBook class provides a programming interface to the Address Book—a centralized database used by multiple applications to store contact and other personal information about people. The Address Book database also supports the notion of a “group” containing one or more persons. People may belong to multiple groups, and groups may also belong to other groups with some restrictions (for example, no circular references are allowed). The ABAddressBook class is “toll-free bridged” with its procedural C opaque-type counterpart. This means that the ABAddressBookRef type is interchangeable in function or method calls with instances of the ABAddressBook class.

## Topics

### Creating and Initializing an Address Book

- [shared()](addressbook/abaddressbook/shared().md)

### Retrieving Groups and People

- [groups()](addressbook/abaddressbook/groups().md)
- [people()](addressbook/abaddressbook/people().md)

### Setting and Retrieving the Logged-in User’s Record

- [me()](addressbook/abaddressbook/me().md)
- [setMe(_:)](addressbook/abaddressbook/setme(_:).md)

### Retrieving a Specific Record

- [record(forUniqueId:)](addressbook/abaddressbook/record(foruniqueid:).md)

### Retrieving the Class of a Record

- [recordClass(fromUniqueId:)](addressbook/abaddressbook/recordclass(fromuniqueid:).md)

### Retrieving a Formatted Address

- [formattedAddress(from:)](addressbook/abaddressbook/formattedaddress(from:).md)

### Retrieving Default Values

- [defaultCountryCode()](addressbook/abaddressbook/defaultcountrycode().md)
- [defaultNameOrdering()](addressbook/abaddressbook/defaultnameordering().md)

### Adding and Removing Records

- [add(_:error:)](addressbook/abaddressbook/add(_:error:).md)
- [add(_:)](addressbook/abaddressbook/add(_:).md)
- [remove(_:error:)](addressbook/abaddressbook/remove(_:error:).md)
- [remove(_:)](addressbook/abaddressbook/remove(_:).md)

### Searching

- [records(matching:)](addressbook/abaddressbook/records(matching:).md)

### Saving and Detecting Changes

- [hasUnsavedChanges()](addressbook/abaddressbook/hasunsavedchanges().md)
- [save()](addressbook/abaddressbook/save().md)
- [saveAndReturnError()](addressbook/abaddressbook/saveandreturnerror().md)

### Constants

- [Database change notification keys](addressbook/database-change-notification-keys.md)
- [Errors](addressbook/1529225-errors.md)

### Notifications

- [abDatabaseChanged](foundation/nsnotification/name-swift.struct/abdatabasechanged.md)
- [abDatabaseChangedExternally](foundation/nsnotification/name-swift.struct/abdatabasechangedexternally.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
