Skip to content

8.9.0

Compare
Choose a tag to compare
@danielsaidi danielsaidi released this 27 Sep 12:50
· 48 commits to master since this release

This version adds a new Keyboard.NumberPad component, next character prediction-based tap area sizes, and a KeyboardThemeContext that let you persist themes. It also adds service shorthands, so that you can type .standard(...) instead of KeyboardAction.StandardHandler(...).

This version also continues to rename types to make things more consistent. This means that are now many deprecations, which may be confusing, but it's all in service for a clean 9.0 transition.

🛠️ Xcode 16

KeyboardKit and KeyboardKit Pro are now built with Xcode 16, using the Swift 6 compiler.

‼️ New ways to set up KeyboardKit!

This version lets you use a KeyboardApp to set up your keyboard extension, and separates setting up the keyboard from setting up the keyboard view.

You can now call setup(for:) (or setupPro(for:completion:) for KeyboardKit Pro) in viewDidLoad(), to set up App Group syncing, dictation, register your KeyboardKit Pro license key, etc., then use setupKeyboardView(_:) in viewWillSetupKeyboardView().

This change means that you can set up KeyboardKit and KeyboardKit Pro earlier, and that setting up the view is identical for both SDKs. As a bonus, we can add more information to the KeyboardApp over time, to let the setup function do more than it does today.

🧪 Experiments

The two experimental modes for the next keyboard button have been reported to work well, and are now enabled by default:

  • Keyboard.NextKeyboardButtonControllerMode.current now uses .experimentalNilTarget
  • Keyboard.NextKeyboardButtonProxyMode.current now uses .experimental

If you experiment any problems with these new experimental modes, you can set each to .classic to revert back. Make sure to report any problems, since these experimental modes are planned to replace the classic modes in KeyboardKit 9.0.

✨ Features

  • AutocompleteContext has new nextCharacterPrediction(for:) functions.
  • DictationContext can now be set up for a KeyboardApp.
  • Image has a new keyboardTheme image value.
  • Keyboard.NumberPad is a new keyboard component.
  • Keyboard.State has a new themeContext property.
  • Keyboard.Services has a new tryRegisterLocalizedCalloutService function.
  • Keyboard.Services has a new tryRegisterLocalizedLayoutService function.
  • KeyboardApp has new deepLinks and keyboardBundleId properties.
  • KeyboardCalloutService has a new tryRegisterLocalizedService function.
  • KeyboardController has a new setup(for:) to setup the keyboad for a KeyboardApp.
  • KeyboardInputController can now be set up for a KeyboardApp.
  • KeyboardLayoutService has a new tryRegisterLocalizedService function.
  • KeyboardSettings can now be set up for a KeyboardApp.
  • KeyboardView now applies next character probabilities to its items.
  • KeyboardThemeContext is a new context type for theme-related state.
  • View+KeyboardButton now supports applying extended tap areas to more probable keys.

👑 Pro Features

  • KeyboardApp.HomeScreen can now opt-in to link to the themes screen.
  • KeyboardApp.ThemeScreen is a new screen that can be used as a theme picker.

💡 Adjustments

  • Color and Image extensions have been moved to the Styling namespace.
  • KeyboardAction.StandardHandler improves auto-ignore to behave better.
  • KeyboardApp marks the old initializer as @_disfavoredOverload.
  • KeyboardContext no longer syncs keyboard type for the same value.
  • KeyboardContext now starts with KeyboardType.alphabetic(.auto).
  • KeyboardInputViewController.host now handles the host bundle ID within the main app.
  • KeyboardView will show a Keyboard.NumberPad if the .keyboardStyle is .numberPad.

⚡️ Shorthands

  • Autocomplete.DisabledService can be resolved with .disabled(...).
  • Callouts.DisabledService can be resolved with .disabled.
  • Callouts.StandardService can be resolved with .standard(...).
  • Dictation.DisabledService can be resolved with .disabled.
  • Dictation.DisabledKeyboardService can be resolved with .disabled(...).
  • Feedback.DisabledService can be resolved with .disabled.
  • Feedback.StandardService can be resolved with .standard.
  • Gestures.SpaceDragGestureHandler can be resolved with .spaceDrag.
  • KeyboardAction.StandardHandler can be resolved with .standard(...).
  • KeyboardLayout.DisabledService can be resolved with .disabled.
  • KeyboardLayout.StandardService can be resolved with .standard(...).
  • KeyboardStyle.StandardService can be resolved with .standard(...).

⚡️ Shorthands (KeyboardKit Pro)

  • Autocomplete.LocalService can be resolved with .local(...).
  • Autocomplete.RemoteService can be resolved with .remote(...).
  • Callouts.ProService.<Locale> can be resolved with .<locale>.
  • Dictation.ProService can be resolved with .pro(...).
  • Dictation.ProKeyboardService can be resolved with .proInKeyboard(...) and .proInApp(...).
  • KeyboardLayout.ProService.<Locale> can be resolved with .<locale>(...).
  • KeyboardStyleService.ThemeBased can be resolved with .themeBased(...).

📖 Documentation

  • The documentation has been adjusted for Xcode 16.

🐛 Bug Fixes

  • This protect against an undefined key error when instantiating a KeyboardInputViewController in an app.

🗑️ Deprecations & Renamings

  • KeyboardController setup(with:) has been renamed to setupKeyboardView(_:).
  • KeyboardController viewWillSetupKeyboard() has been renamed to viewWillSetupKeyboardView().
  • KeyboardStyleProvider and its related types are renamed to KeyboardStyleService.