hex/ios/HEXKeyboard
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel f17a60d40b iOS: read the field's documentIdentifier without trapping on nil
UITextDocumentProxy.documentIdentifier is declared non-optional, but the
keyboard's proxy returns nil early on (in viewDidLoad, and at times later).
Reading that nil as Swift's UUID traps. Two agents hit it: the Debug
keyboard crashed in followTypingLogField() and in viewDidLoad. In Release
it's undefined behaviour.

Reproduced on dev 71b5a8ec in the iOS 27.0 simulator with Record typing
logs on: Hex up in Safari's address bar, then Messages and back to Safari,
five times. The keyboard crashed 4 times, 2 EXC_BREAKPOINT in
UUID._unconditionallyBridgeFromObjectiveC from beginTypingLogSession
(viewWillAppear), each followed by the extension host's abort. Earlier
reports trap the same way from followTypingLogField (textDidChange). The
same script on this commit crashed 0 times.

Both reads (typing-log session start and field follow) now go through
TypingLogTraits.documentIdentifier(of:), which reads it through key-value
coding after a responds(to:) check and gives nil instead of trapping. A
document UIKit couldn't name yet counts as the session's field
(TypingLogTraits.isOtherField(than:)). So a session that began before the
field was named isn't split in two when the name arrives: it keeps the
document instead. Another document or other traits still start a new
session, as before.

Verified: xcodebuild test on an iPhone 17 (iOS 27.2) simulator, all tests
passing (1 skipped, as on dev), with new TypingLogTests cases: a nil
document reads as nil with no trap, a real one reads as itself, and an
object without the property gives nil. An unnamed document matches the same
field, and other documents or traits don't.
2026-11-20 22:44:23 -05:00
..
CleanupTagger iOS: clean up what I say with an on-device tagger (experiment) (#2023) 2026-11-20 01:29:41 +00:00
TypingModel iOS: spatial autocorrect experiment with Google Books models, plus accent and two-letter fixes (#2059) 2026-11-20 16:18:07 +00:00
ContainingAppOpener.swift Open Hex from the iPhone keyboard and show live keyboard setup (#599) 2026-10-31 09:56:02 -07:00
HEXKeyboard.entitlements Set up Hex Mobile internal TestFlight releases (#1997) 2026-11-19 11:48:49 -05:00
Info.plist iOS: plain permission prompts and no pre-prompt Allow button, for App Review (#2058) 2026-11-20 16:13:36 +00:00
KeyboardLocalDictation.swift iOS: onboarding follows the desktop flow (#2136) 2026-11-21 03:27:38 +00:00
KeyboardViewController.swift iOS: read the field's documentIdentifier without trapping on nil 2026-11-20 22:44:23 -05:00
PrivacyInfo.xcprivacy iOS: version 1.0, iPhone only, privacy manifests (#2052) 2026-11-20 15:54:01 +00:00