<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UILexicon",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UILexicon"
  },
  "title" : "UILexicon"
}
-->

# UILexicon

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

```
@MainActor class UILexicon
```

## Overview

To obtain the lexicon, call the [`requestSupplementaryLexicon(completion:)`](/documentation/UIKit/UIInputViewController/requestSupplementaryLexicon(completion:)) method of the [`UIInputViewController`](/documentation/UIKit/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](https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/CustomKeyboard.html#//apple_ref/doc/uid/TP40014214-CH16) in [App Extension Programming Guide](https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/index.html#//apple_ref/doc/uid/TP40014214).

## Topics

### Accessing the lexicon

[`entries`](/documentation/UIKit/UILexicon/entries)

A read-only array of term pairs for use by a custom keyboard.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)