Returns a predicate to find the container of the specified contact.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- watchOS 2.0+
Framework
- Contacts
Declaration
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 CNContact
.
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.