* iOS keyboard: Code from Messages only where its tap reaches Apple's keyboard, and without Full Access
TestFlight build 126 (iPhone 15 Pro, iOS 27.3): "That autofill for texted codes fails".
Cause, shown on an iPhone 15 Pro simulator (iOS 27.2) with real touches: the chip switches
with advanceToNextInputMode. On a number pad that always lands on Apple's number pad (Emoji and
other third-party keyboards are passed over). On any other code field (Safari's
autocomplete=one-time-code input, a .oneTimeCode field with autocorrection off) it lands on
Emoji in 10 of 21 taps with English + Emoji + Hex (iPhone's default list plus Hex, in any
order), and on another third-party keyboard in 4 of 8 taps with one in the list. Those get no
code, so the chip does nothing. Separately, the chip needed Full Access, though switching
keyboards doesn't.
Change (KeyboardClipboardTracker.offer, KeyboardInputModes.switchReachesAppleKeyboard):
- Outside number pads, Code from Messages shows only when every other keyboard is one of
Apple's language keyboards (no Emoji, no other third-party keyboard). Removed: the chip in
Safari's text-style code fields for anyone with Emoji on; a copied code still gets Paste.
Number pads (including Safari's inputmode=numeric) keep it in every list with Apple's keyboard.
- The chip no longer needs Full Access; Paste still does and still reads nothing without it.
- The comment that said the switch skips Emoji in either order is corrected.
Verified on that simulator, the fixed build:
- English + Emoji + Hex: Safari one-time-code and a .oneTimeCode autocorrection-off field show no
chip (Paste only with a copy); a number-pad field and inputmode=numeric show it and the tap
lands on Apple's number pad.
- English + Hex: chip in both kinds, tap lands on Apple's keyboard. Hex + another third-party
keyboard + English: text field no chip, number pad chip -> Apple's number pad.
- Full Access off (English + Hex): chip shows in both kinds and lands on Apple's keyboard;
with Emoji, on the number pad only. No Paste chip without Full Access.
- Before the change on origin/dev (fd4e98bb, the 44 pt bar): the chip draws and takes its tap
upright and turned, at its edges, and beside Paste.
- xcodebuild test on the rebased head: 857 tests, 3 skipped, 0 failures, including the new
KeyboardClipboardTests.testCodeFromMessagesOnlyWhereTheSwitchReachesApplesKeyboard.
- code-shape.py passes. Not verified: whether Apple's keyboard then shows the code (a simulator
gets no texts), or a real phone.
* iOS keyboard: Code from Messages opens the keyboard list where the next keyboard could be Emoji
Follow-up to the previous commit, at the coordinator's request: hiding the chip in text-style
code fields whenever Emoji or another third-party keyboard is on took it away from almost
everyone (Emoji is on by default) with no pointer to where codes come from.
Change:
- Where advanceToNextInputMode could land elsewhere (Emoji or another third-party keyboard on,
field not a number pad), the chip stays and a tap opens iOS's own keyboard list, where the
person picks Apple's keyboard. Replaced: the previous commit's hiding of the chip there.
KeyboardInputModes.route gives .next or .list (nil without Apple's keyboard);
KeyboardClipboardOffer.code gains opensList (default false).
- The chip's touches go to handleInputModeList(from:with:) as the globe's do, through the
globe's own path (FullKeyboardView.inputModeListTouch, split out of globeTouch unchanged): the
lift of a touch that stayed on the chip is held back, so UIKit's 0.2 s hold opens the list
(as the globe does on the Duo's split posture, #2340). A hold shows it under the finger, and
a slide onto a keyboard picks it on lift. The chip's .touchUpInside does nothing in that mode.
- Number pads and lists with only Apple's keyboards besides Hex keep the direct switch.
- Accessibility hint in list mode: "Shows your keyboards: pick Apple's, where iOS offers codes
from Messages and Mail" (zh-Hans added). The direct mode keeps its hint.
- showsPasteChip matches .code(canPaste: false, _) so the list mode doesn't show Paste.
Verified (iPhone 15 Pro simulator, iOS 27.2, real touches; Apple's keyboard told apart through
its keys in the accessibility tree):
- List mode, a pick of English (US) from the list: 55 of 56 picks landed on Apple's keyboard
across English + Emoji + Hex, Hex + Emoji + English, Hex + another third-party + English and
English + Hex + another third-party; Safari one-time-code and a .oneTimeCode field with
autocorrection off; upright and turned; beside Paste; Full Access on and off; tap, hold and
slide-and-lift. The one miss ended on Hex with the list gone; once, the direct switch did
the same (shown on Apple's keyboard, then Hex again half a second later), so it isn't
specific to the list.
- Direct mode unchanged: number pads in every list and English + Hex reach Apple's keyboard
with no list.
- On the head rebased onto #2386 (Paste alone takes the whole bar): 5 more list picks and 2
number-pad switches reach Apple's keyboard, and Paste beside the chip still pastes.
- xcodebuild test on that head: 858 tests, 3 skipped, 0 failures, including
testCodeFromMessagesOpensTheListWhereTheSwitchCouldMissApplesKeyboard. code-shape.py passes.
- Not verified: VoiceOver with the list mode, a real phone, and whether Apple's keyboard then
shows the code (a simulator gets no texts).