Instance Method


Determines whether the contact property value for the specified key is fetched.


func isKeyAvailable(_ key: String) -> Bool



A contact property key. For a list of valid keys, see Contact Keys.

Return Value

true if the value is fetched, otherwise false.


The isKeyAvailable(_:) or areKeysAvailable(_:) methods are used when you are not certain of the keys that were fetched. If this method returns false, refetch the contact using the contact identifier and the keys you want to fetch. Accessing a property that was not fetched will throw CNContactPropertyNotFetchedExceptionName.

See Also

Checking the Availability of Data

func areKeysAvailable([CNKeyDescriptor]) -> Bool

Determines whether all contact property values for the specified keys are fetched.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software