<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Contacts",
  "identifier" : "/documentation/Contacts/CNContainer/predicateForContainerOfContact(withIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Contacts"
    ],
    "preciseIdentifier" : "c:objc(cs)CNContainer(cm)predicateForContainerOfContactWithIdentifier:"
  },
  "title" : "predicateForContainerOfContact(withIdentifier:)"
}
-->

# predicateForContainerOfContact(withIdentifier:)

Returns a predicate to find the container of the specified contact.

```
class func predicateForContainerOfContact(withIdentifier contactIdentifier: String) -> NSPredicate
```

## Parameters

`contactIdentifier`

The contact identifier to be matched.

## Return Value

A predicate that can be used to fetch a container from [`CNContactStore`](/documentation/Contacts/CNContactStore).

## Discussion

If the identifier is for a unified contact then this method returns an empty array. To fetch the containers of a unified contact, first fetch the linked contacts and then fetch the container of each linked contact.

---

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)