Contents

UILexicon

A read-only array of term pairs, each in a lexicon entry object, for a custom keyboard.

Declaration

@MainActor class UILexicon

Mentioned in

Overview

To obtain the lexicon, call the requestSupplementaryLexicon(completion:) method of the UIInputViewController class. This method can be called only from a custom keyboard app extension. A lexicon contains words from various sources, including:

  • Unpaired first names and last names from the user’s Address Book database

  • Text shortcuts defined in the Settings > General > Keyboard > Shortcuts list

  • A common words dictionary

Apple intends for you to consider the words in a lexicon object as supplementary to an autocorrection/suggestion lexicon of your own design. For information on custom keyboards, see Custom Keyboard in App Extension Programming Guide.

Topics

Accessing the lexicon

See Also

Custom keyboard