TypedKeymanPackage class
Summary
The TypedKeymanPackage class and its subclasses provide precise typing for the contents of a KeymanPackage.
Syntax
TypedKeymanPackage<TypedLanguageResource>.methodName()
Generic Parameters
TypedLanguageResource:LanguageResource- The type of resource contained within the package. Should be either
InstallableKeyboardorInstallableLexicalModel
Description
TypedKeymanPackage is the base class of KeyboardKeymanPackage and
LexicalModelKeymanPackage, both of which represent richly-typed
parses of their corresponding package files.
Note: 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 forLexicalModelKeymanPackage, this resolves to[[InstallableLexicalModel]].installables(forLanguage: String) -> [TypedLanguageResource]- A language-filtered version of the field above, with the 'language index' dimension dropped.
History
Added in Keyman Engine for iPhone and iPad 14.0.
See Also
-
KeymanPackage- The base class (and type erasure) for packages.


