Autocomplete is coming to macOS
Mar 18, 2023
The local KeyboardKit autocomplete provider will soon be available on all platforms, which means that
watchOS (stubbed) will have it as well.
If you want to use the KeyboardKit Pro
LocalAutocompleteProvider, it’s currently only available on
tvOS. KeyboardKit will perform the necessary OS checks when it registers a license, but if you want to use the provider directly, you may need to add a bunch of OS checks to the code.
KeyboardKit 7.2, the provider will move all platform-specific code to separate engines, then create a separate engine per platform. This makes it possible to make the provider available to all platforms, and have it use a platform-specific engine for each platform.
This means that when we now autocomplete text on
iOS, we will use a platform-specific engine:
This is true on
tvOS as well, which means that you can implement autocomplete even if you skip the keyboard parts:
You will be able to use the provider on
macOS as well, which means that you can autocorrect text in all kind of apps (sorry for this uninspired screenshot):
The provider will be available in
watchOS as well, but the result will be stubbed since the platform lacks autocomplete capabilities.
You may wonder why the provider will be made available on
watchOS when it doesn’t return any suggestions. The reason here is to make the provider available on all platforms to remove the need for OS checks in your code. The provider is still functional, even if it just returns the currentl word.
KeyboardKit 7.2 will be released in the second half of March.
If you found this post interesting and want to discuss it further, feel free to start a discussion in a reply to this tweet or this Mastodon post.