Instance Method

isKeyAvailable:

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

Declaration

- (BOOL)isKeyAvailable:(NSString *)key;

Parameters

key

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

Return Value

YES if the value is fetched, otherwise NO.

Discussion

The isKeyAvailable: or areKeysAvailable: methods are used when you are not certain of the keys that were fetched. If this method returns NO, 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

- areKeysAvailable:

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