Instance Method

allTokens

Returns an array of strings that you can use for full-text searches of the field’s string-based values.

Declaration

- (NSArray<NSString *> *)allTokens;

Return Value

An array of NSString objects containing data from the records string-based fields.

Discussion

When performing your own full-text searches, you can use this method to get a list of strings for your search. The method acts only on keys whose values are NSString objects. It breaks each value string apart at whitespace boundaries, creates new strings for each word, adds the new strings to an array, and returns the array. This tokenized version of the record’s string values makes it easier to do string-based comparisons of individual words.

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