KeyboardKit 8.8.9 - important gesture updates
iOS 18 caused scroll view supporting gestures to stop working, which you can experience in 8.8.8
’s emoji keyboard. KeyboardKit Pro 8.8.9
is therefore built with Xcode 16, to make the gestures work.
iOS 18 scroll gesture bugs
The scroll issues were noticed in early iOS 18 betas, where the scroll view would stop scrolling when a gesture button was touched. This used to work in iOS 17, but stopped working in iOS 18.
To avoid making big changes to fix potentially temporary bugs in early betas, the code was left as is. When the problems persisted in the first public betas, alternatives were looked into.
The reason for the gesture button to stop working in iOS 18 is unknown, but it has previously used a GestureButton
component that resolves more complex gestures when it’s used in a scroll view.
However, these gestures stopped working in iOS 18, where the scroll view would freeze when one of these buttons were touched. Since this is only used in the KeyboardKit Pro emoji keyboard, the bug was isolated, but needed fixing.
iOS 18 specific bug fix
The problem was easily fixed by using iOS 18’s new scroll view API’s, where the scroll view can block buttons from triggering while it scrolls, and buttons can stop scrolling when they receive gestures.
Since these APIs are only available in Xcode 16 (or rather, the Swift 6 compiler), this new approach is only used when the code is built with Xcode 16.
The old approach is still being used in iOS 17 and earlier, where the new APIs are not available, and where the old workaround still works.
With the new approach, there’s no longer any need for a specific set of gestures when the button is used within a scroll view. The same gestures are used everywhere, with a more stable result.
What about iOS 18 and Xcode 15?
Since iOS 18 can’t use the old gesture engine in a scroll view, and the new engine must be built with Xcode 16 (or rather, once again, Swift 6) what happens if you must keep using Xcode 15?
For most cases, this won’t affect you, since KeyboardKit only uses scroll gestures in the KeyboardKit Pro emoji keyboard. However, it affects KeyboardKit Pro, as described further down.
If you use keyboard gestures in a scroll view, you must find a workaround while you still use Xcode 15. Perhaps another component solves this, or can you replace the gestures with a regular button?
If you find a component that supports rich gestures in a scroll view in iOS 18, please reach out for a chance to get it added to KeyboardKit.
KeyboardKit Pro
Since KeyboardKit Pro needs the scroll gestures for its emoji keyboard, KeyboardKit Pro 8.8.9
and later will be built with Xcode 16, to be able to use the new scroll view APIs.
Since KeyboardKit Pro is built as a binary, you must upgrade to Xcode 16 to use this version. If you still need Xcode 15, you can request Xcode 15-based builds for up to 3 months, as described in the Terms & Conditions. Just reach out and we’ll help you out.
However, note that an Xcode 15 build will probably have to simplify the emoji keyboard’s gestures in iOS 18, and most probably use regular buttons without support for multiple gestures or callouts.
Conclusion
The KeyboardKit Pro 8.8.9
builds with Xcode 16 to benefit from the button gesture improvements that are made possible with the new scroll view APIs. Since KeyboardKit Pro is built as a binary, you must upgrade to Xcode 16 to use this version.
Reach out to request an Xcode 15-based build, if you can’t upgrade to Xcode 16. Read more about on-demand builds in the Terms & Conditions.
Discussions & More
If you found this interesting, please share your thoughts by repling to this tweet or this toot.
Follow on Twitter and Mastodon to be notified when new content & articles are published.