areKeysAvailable(_:)
Determines whether all contact property values for the specified keys are fetched.
Declaration
func areKeysAvailable(_ keyDescriptors: [any CNKeyDescriptor]) -> BoolParameters
- keyDescriptors:
An array of contact property keys and/or key descriptors from contact objects.
Return Value
true if all the values are fetched; otherwise, false.
Discussion
The isKeyAvailable(_:) or areKeysAvailable(_:) methods are used where you are not certain of the keys that when 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 an CNContactPropertyNotFetchedExceptionName exception.