

You can then use setup(with:) to setup your extension with any SwiftUI view. KeyboardInputViewController will call viewWillSetupKeyboard whenever the keyboard must be created or re-created due to things like screen size changes. Inheriting KeyboardInputViewController also gives extensions access to new view lifecycle functions, autocomplete logic, extensions and more. extra observables like keyboardContext as well as services like keyboardActionHandler, keyboardAppearance etc. It provides you with a lot of additional functionality, e.g. Then, you should then inherit KeyboardInputViewController instead of UIInputViewController. You can add it to the hosting app as well, but the keyboard extension must have it.

If you use Swift Package Manager, make sure to add KeyboardKit to your keyboard extension. To build a keyboard extension with KeyboardKit, add KeyboardKit to your project as shown above.

build_settings = 'No' end end end Getting Started Target 'MyApp' do pod 'KeyboardKit' end target 'MyKeyboard' do pod 'KeyboardKit' end post_install do | installer|
