---
title: "predicateForContainerOfContact(withIdentifier:)"
framework: contacts
role: symbol
role_heading: Type Method
path: "contacts/cncontainer/predicateforcontainerofcontact(withidentifier:)"
---

# predicateForContainerOfContact(withIdentifier:)

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

## Declaration

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

## Parameters

- `contactIdentifier`: The contact identifier to be matched.

## Return Value

Return Value A predicate that can be used to fetch a container from 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.

## See Also

### Generating Search Predicates for Containers

- [predicateForContainers(withIdentifiers:)](contacts/cncontainer/predicateforcontainers(withidentifiers:).md)
- [predicateForContainerOfGroup(withIdentifier:)](contacts/cncontainer/predicateforcontainerofgroup(withidentifier:).md)
