spiegel-keyman/ios
Marc Durdin c51657a5d6
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Merge branch 'master' into feat/ios/325-add-keyman-version-check-to-package-version
2026-07-09 17:44:45 +10:00
..
docs docs(ios): Use /cdn/dev assets for Engine guides 2025-12-01 08:06:01 +07:00
engine Merge branch 'master' into feat/ios/325-add-keyman-version-check-to-package-version 2026-07-09 17:44:45 +10:00
keyman Revert "maint(ios): resolved warnings for Xcode 26" 2026-02-23 13:38:01 -05:00
keymanios.xcworkspace chore(ios): Revert "maint(ios): build with Xcode 26" 2026-01-26 12:36:35 -05:00
samples maint(mac): use mac_ prefix for functions in mac.inc.sh 2025-08-20 05:40:32 +02:00
scripts maint(mac): use mac_ prefix for functions in mac.inc.sh 2025-08-20 05:40:32 +02:00
tools chore(ios): Cleanup RELEASE_OEM_FIRSTVOICES var in build.sh scripts 2026-02-20 10:34:55 +07:00
.build-builder change(ios): mass rework of ios-related scripts 2023-06-27 10:33:37 +07:00
.gitignore fix(ios): bundle in KMW's globe-hint.css 2026-06-26 14:36:27 -05:00
.swiftlint.yml chore(ios): allow underscore to avoid unexpected Xcode 15.3 lint error 2024-05-02 09:53:40 +07:00
build.sh chore(ios): Cleanup RELEASE_OEM_FIRSTVOICES var in build.sh scripts 2026-02-20 10:34:55 +07:00
Cartfile maint(ios): update sentry version 2026-01-28 18:20:06 -05:00
Cartfile.resolved maint(ios): upgrade Sentry version 2026-01-26 12:46:05 -05:00
ci.sh maint(common): use builder_launch for child builds 2025-12-02 06:17:31 +01:00
exportAppStore.plist chore(ios): renew certificate 2025-10-08 20:21:51 -04:00
history.md chore: merge stable history 2020-04-29 06:33:31 +10:00
i18n-export.sh maint(mac): use mac_ prefix for functions in mac.inc.sh 2025-08-20 05:40:32 +02:00
README.md chore(ios): force new build 2024-04-29 04:56:56 +07:00
test.sh maint(mac): use mac_ prefix for functions in mac.inc.sh 2025-08-20 05:40:32 +02:00
zip-excludes fix(ios): Apply review comments 2025-05-23 05:57:25 +07:00

Keyman for iOS

Prerequisites

See build configuration for details on how to configure your build environment.

Keyman App

The source for our published iOS Keyman app is found within the keyman/ subdirectory. This project only contains the views specific to the Keyman app, while the core functionality is found in KeymanEngine.framework.

Building

To build Keyman for iOS, please run the build.sh build script within this folder against the :app target. You will need to run with the command-line argument --debug or establish alternate code-signing permissions to complete the build for the final app.

  • Thus: ./build.sh build:engine --debug

To run the app within a simulator after build.sh is completed,

  1. Open keymanios.xcworkspace in Xcode.
  2. Run the Keyman target.

The Keyman app relies on KeymanEngine.framework, which will automatically be rebuilt by Xcode whenever it is changed.

Each individual component also possesses its own separate build script; this folder's ./build.sh can be used to run any and all of them as desired.

For CI builds, note the parallel ./ci.sh - this is the primary script used to launch builds as part of our continuous integration processes. It may be used to set configuration for calls of the primary ./build.sh and others.

Running the app on a physical device

In order to test any code changes on a physical device, Apple requires that an app be code-signed. (Note that code-signing is not necessary for Simulator runs.) The quickest way to handle this for personal testing:

  • Open Xcode and the settings for the Keyman target.
  • Establish personal code-signing permissions.
    • Go to the General tab and enable "Automatically manage signing" and select your "Personal Team."
    • Change the "Bundle Identifier" for both the Keyman and SWKeyboard targets to something personal and unique.
    • Afterward, swap to the Capabilities tab, remove the existing "App Groups", and define your own unique group for the Keyman target.
    • Then, make the "App Group" settings of SWKeyboard match those of Keyman.
    • Perform a find and replace for the group identifier "group.KM4I" and with your selected unique group name.
    • Correct any further error messages Xcode presents you with.
    • Note: All changes for this step (code-signing permissions, app groups, bundle identifier, etc) must be reverted to the original settings for submitted PRs.
  • Under the Product > Destination Xcode menu, select the device you wish to use for testing.
  • Attempt to "Run" Keyman on the device. The operation should fail, but this step is necessary to continue.
  • Now, on the device itself, go to Settings > General > Profiles & Device Management and give your developer account trusted permissions.

You should then be freely able to test the app on your personal development device.

KeymanEngine

KeymanEngine is a Swift 4 framework containing the core functionality of Keyman, including

  • The keyboard view and text views that use the Keyman keyboard.
  • Keyboard selection and downloading.

Building

To build using command line, run ./build.sh build:engine --debug.

To build in Xcode,

  1. Open engine/KMEI/KeymanEngine.xcodeproj.
  2. Build the KME-universal target.

The framework will be built to engine/KMEI/build/(Debug|Release)-universal/KeymanEngine.framework.

Linking with KeymanEngine

  1. Add KeymanEngine.framework to 'Linked Frameworks and Libraries' and 'Embedded Binaries' in your project targets.

Usage

TextView and TextField can be used in place of UITextView and UITextField. These views use Keyman as a keyboard and will render with custom fonts. KeyboardPickerButton and KeyboardPickerBarButtonItem open a view for the user to switch keyboards or download new keyboards. InputViewController can be subclassed to create a system keyboard.

Manager must be set up when your app is initializing. If your app has a system keyboard, you must create an app group entitlement, and set Manager.applicationGroupIdentifier before any KeymanEngine classes are initialized and before Manager.shared is used. Also set Manager.shared.openURL to UIApplication.shared.openURL in your app. Refer to Manager for more detailed usage and configuration options.

Samples

The KeymanEngine project contains a demo app that demonstrates usage of the framework. There are also two sample apps in sample/. KMSample1 demonstrates use of TextView and bundling a keyboard in your app. KMSample2 demonstrates how to create a system keyboard.

To build the samples, cd into the project directory and run ./build.sh.