<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AddressBook",
  "identifier" : "/documentation/AddressBook/ABCopyRecordForUniqueId(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Address Book"
    ],
    "preciseIdentifier" : "c:@F@ABCopyRecordForUniqueId"
  },
  "title" : "ABCopyRecordForUniqueId(_:_:)"
}
-->

# ABCopyRecordForUniqueId(_:_:)

Returns the record that matches the given unique ID.

```
func ABCopyRecordForUniqueId(_ addressBook: ABAddressBookRef!, _ uniqueId: CFString!) -> Unmanaged<ABRecordRef>!
```

## Parameters

`addressBook`

The address book for the logged-in user.

`uniqueId`

A unique ID for the record. If this is `NULL`, this function raises an exception.

## Return Value

The record that matches the given unique ID. If no record matches `uniqueId`, the function returns `NULL`. You are responsible for releasing this object.

## Discussion

---

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)