Keyboard Support

Contact and Search Homepage

Header bottom

Other versions
Version 16.0 (current version)Version 15.0Version 14.0

On this page

TypedKeymanPackage class


The TypedKeymanPackage class and its subclasses provide precise typing for the contents of a KeymanPackage.



Generic Parameters

TypedLanguageResource: LanguageResource
The type of resource contained within the package. Should be either InstallableKeyboard or InstallableLexicalModel


TypedKeymanPackage is the base class of KeyboardKeymanPackage and LexicalModelKeymanPackage, both of which represent richly-typed parses of their corresponding package files.

Note that the type erasure, KeymanPackage, will often be easier to work with in methods looking to handle both types of packages due to Swift's typing constraints.

Methods and Fields

findResource(withID:) -> TypedLanguageResource?
Returns the resource matching the specified ID, if contained within the package.
installables: [[TypedLanguageResource]]
Returns a list of all resources & language pairings supported by this package.

For KeyboardKeymanPackage, this resolves to [[InstallableKeyboard]], while for LexicalModelKeymanPackage, this resolves to [[InstallableLexicalModel]].
installables(forLanguage: String) -> [TypedLanguageResource]
A language-filtered version of the field above, with the 'language index' dimension dropped.


Added in Keyman Engine for iPhone and iPad 14.0.

See Also

The base class (and type erasure) for packages.