<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AddressBook",
  "identifier" : "/documentation/AddressBook/ABAddressBook-swift.class/shared()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Address Book"
    ],
    "preciseIdentifier" : "c:objc(cs)ABAddressBook(cm)sharedAddressBook"
  },
  "title" : "shared()"
}
-->

# shared()

Returns the unique shared instance of `ABAddressBook`, or `nil` if the Address Book database can’t be initialized.

```
class func shared() -> ABAddressBook!
```

## Return Value

The unique shared instance of `ABAddressBook`, or `nil` if the Address Book database can’t be initialized.

## Discussion

This method returns the address book for the logged-in user that is shared by every application. If you call this method more than once or try to create a new address book, you will get a pointer to the same shared address book.

If you’re just making one-off lookups and edits, this is the appropriate method to use. If your code is executing a tight loop, using the [`addressBook`](/documentation/AddressBook/ABAddressBook-swift.class/addressBook) method with the  [`init(addressBook:)`](/documentation/AddressBook/ABRecord-swift.class/init(addressBook:)) method of [`ABPerson`](/documentation/AddressBook/ABPerson) can yield significant performance improvements. See [Accessing the Address Book](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AddressBook/Tasks/ManagingGroups.html#//apple_ref/doc/uid/20001022-102346) for more details.

If the user denies your application access to the Address Book database, this method returns `nil`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)