Turns out keyboard extensions can't access the microphone API at all on iOS, so the only workaround is bouncing out to a host app to record then back to the keyboard, which is a terrible experience. Because of that, it's macOS only.
That's a developer called claviska on Hacker News, explaining why his dictation app never got an iPhone version. He shipped the Mac build. The phone got cut.
Not because nobody wanted it. He wanted it himself, badly enough to write it down in public.
Here's the hole in the platform. A custom keyboard could not touch the mic. So if you wanted to talk instead of type, the keyboard opened its parent app, recorded there, then dumped you back into whatever you were typing in.
Except Apple gives you no API for returning to the keyboard. None.
So the app had to ask users to tap the small back link in the top left corner. By hand. Every time.
Years of engineering, and the whole experience came down to hunting for a back button.
On Nov 20, 2026, Johan Thorell at Raycast posted a way to skip that dance entirely. KeyboardKit 11.3 shipped it inside the SDK one day later.
I've watched a lot of iOS workarounds land. This is the first one that made me put my coffee down.
What shipped
Most tutorials tell you the new engine is a one-line change. That's true, and also useless as an explanation.
KeyboardKit is Daniel Saidi's Swift SDK for custom keyboards. Version 11.3 adds a dictation engine that lives inside the extension itself.
Here's the entire integration:
override func viewWillSetupKeyboardKit() {
setupKeyboardKit(
for: .myApp,
dictationEngine: pluginDictationEngine(.inKeyboard(for: self))
)
}
That's it. The engine records audio through an embedded web view, transcribes with the same recognizer the main app engine already used, and still returns volume data so the bars move.
| KeyboardKit 10.x | 11.3 .inKeyboard
|
|
|---|---|---|
| Round-trip to main app | Every session | None |
| Background audio mode | Required | Not needed |
| App Store justification | Extra paperwork | Nothing extra |
| Mic after dictation | On until you stop | Ends with the keyboard |
The old approach worked. It was real engineering. But every part of it leaked into the developer's week.
Why it was blocked
I used to think the mic restriction was a technical gap Apple never got around to closing. It's policy, and it's written down.
Guideline 4.4.1 says keyboard extensions must provide keyboard input, remain functional without Full Access, and must not launch other apps besides Settings.
Opening the containing app was never really allowed either. Everyone did it because the alternative was no voice input at all.
Then the permission problem. An extension can't show a system prompt. Dialogs belong to apps, not keyboards.
So the extension had no legal way to ask for the mic in the first place.
Then the sandbox. AVAudioEngine and AudioQueue inside a keyboard process tend to get killed or invalidated by the host app, even with Full Access on.
People tried that path for years. It fails in ways that look random. Which is the worst kind of failure to debug.
The actual mechanism
What actually happens is WebKit holds the microphone, not your code.
Stephan Cilliers published a reproduction repo one day after the Raycast post. The whole capture layer is about 200 lines.
Here's the shape of it:
- Put a
WKWebViewin the keyboard at 1x1 pt with alpha 0.01, still inside the window. - Load inline HTML from an https base URL so
getUserMediatreats it as a secure origin. - Grant the mic yourself in
requestMediaCapturePermissionFor. - Downsample to 16 kHz PCM in JavaScript and post each buffer to native as base64.
- Feed the chunks into
SFSpeechAudioBufferRecognitionRequestand type the partials into the host field.
The web view has to sit in the window at alpha 0.01. Not hidden, not detached. WebKit treats an out-of-window view as inactive and throttles it, and that detail has surely cost someone a weekend.
And there's a dead-man's switch. Native code pings the page every second. Miss three and the page stops the mic by itself.
That one detail is what turns a clever trick into something you can defend.
Cilliers is clear that it's public APIs only. No private frameworks, no odd selectors. That matters, because the whole thing lives or dies at App Review.
What it saves you
The first time i wired dictation into a keyboard, i spent two weeks on entitlements and submission notes and ended up with a mic button that stayed hot until the user got bored.
11.3 deletes that entire subsystem.
No background audio entitlement. No paragraph explaining why the mic is still live. No support threads about a back link nobody can find.
And the fallback is built in. The engine ships marked experimental, so you keep the standard engine and degrade into the old round-trip instead of a dead button.
The rest of the release is good housekeeping. .systemShortcut(_:) fires Shortcuts workflows from the keyboard with optional input like the clipboard. A disk-cached KeyboardPreview keeps a theme grid from melting the extension.
Localization also collapses into one KeyboardLocalization type. But the dictation engine is the release. Everything else is tidying.
Why agents should care
Here's a question people always ask: why does voice input matter past basic typing?
Because a text field is a doorway.
Raycast's own changelog for the same update reads like a team exhaling. Dictation happens right inside the keyboard. Tap the mic, start talking, no jump to the app and back.
Stack that next to the new shortcut action and you get a chain that didn't exist last week. Talk into a field, let a Shortcut pick up the text, push it into your agent, get an answer, insert it.
Same keyboard. No context switch. The phone stops being a place where your agent is trapped inside one app.
That's the part worth being excited about, and it's also the part with the shortest shelf life.
A detour about fake addresses
The demo loads its HTML with this base URL: https://keyboard-dictation.invalid/
Nothing is ever fetched from it. It exists so WebKit believes the page sits on a secure origin. .invalid is reserved by the standards body precisely so it can never resolve to anything.
I like this more than i should. A fake address, invented so a framework stops being suspicious.
We do this everywhere and rarely admit it. Placeholder keys in configs. A localhost hack that survived into production.
Files called final_v3_really. A pile of scaffolding holding the real thing up. Half of shipping software is knowing which lies are load-bearing.
The honest part
This is a workaround, and workarounds expire.
KeyboardKit's announcement says it plainly. The team expects a flood of apps to copy this, and expects Apple to either kill it in an iOS update or start rejecting keyboard updates that declare microphone access in the extension. Hence the experimental label and the fallback advice.
So don't build your product on this. Build the fallback first, then turn this on as an upgrade when it works.
And here's the critique the community isn't saying loudly enough. An invisible web view quietly holding your microphone inside a keyboard is a scary pattern, even with good intent.
The heartbeat is what makes it acceptable. Anyone copying this needs to copy that part too.
If you're a solo dev with a hobby keyboard, this is overkill. Ship the round-trip and sleep fine.
The back link
There's a clip in Cilliers' repo of him dictating a reply inside the X app. Live transcription, no app switch. It looks like nothing is happening, which is the point.
Two years of complaints, two days of sharing, and the user experience came down to whether you had to tap a link in the top left corner.
Somebody at Apple will read this and decide what happens next. My bet is a quiet release note with no explanation attached.
Until then the mic works, and nobody has to go looking for the back button.
