Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 15.0Version 14.0 (current version)Version 13.0Version 12.0Version 11.0Version 10.0Version 2.0 (home page)

On this page

Manager.stateForKeyboard()

Summary

The stateForKeyboard() method returns the current state for a keyboard.

Syntax

Manager.stateForKeyboard(keyboardID: String)

Parameters

keyboardID
ID of the keyboard.

Returns

Returns the keyboard state: downloading, needsDownload, needsUpdate, or upToDate.

Description

This syntax can be used for getting the state of a keyboard.

Examples

Example: Using stateForKeyboard()

The following script illustrates the use of stateForKeyboard():

let kbState = Manager.shared.stateForKeyboard(withID: kb.id)
if kbState == .needsUpdate {
  if !kbIDs.contains(kb.id) {
    kbIDs.insert(kb.id)
    updateQueue!.append(kb)
  }
}