The KeymanPackage class and its subclasses represent Keyman package files and their contents.
The KeymanPackage is the base class used to represent various types of Keyman packages within
the Keyman Engine and their contents. As an abstract class, it serves as a "type erasure"
for its subclasses
both of which offer richer typing for certain fields and methods.
- Returns a unique identifier for the package, usable in package-search operations.
- An array of languages supported by the keyboards or lexical models contained by the package.
The most relevant fields for
Languagetype are the
id: Stringfields. (The other fields are mostly 'legacy'.)
- The user-friendly name of the package.
- An enum representing the type of LanguageResource contained within the package.
May be either
- The base folder for the package's extracted contents.
Note: for packages opened with
ResourceFileManager.shared.prepareKMPInstall, this may be a temporary location!
Stability is not guaranteed if you write to any contents of the folder or its subfolders, but read operations are permitted.
- The package's version.
installableResourceSets -> [[AnyLanguageResource]]
- Returns a list of all resources & language pairings supported by this package.
installableResources(forLanguage: String) -> [AnyLanguageResource]
- A language-filtered version of the method above.
pageURL(for: KeymanPackagePage) -> URL?
- Provides a link to known .html files contained by the package.
.custom(bundledPath: String), the latter of which may target arbitrary locations within the package.