How do voice dictation keyboard apps (like Wispr Flow) return users to the previous app automatically?

I'm developing a keyboard extension that opens my containing app for voice dictation (similar to Wispr Flow and Whisper). The flow is:

  1. User is in a host app (Messages, WhatsApp, etc.)
  2. User taps mic button in my keyboard extension
  3. My app opens via deep link (myapp://dictation)
  4. After dictation completes, I need to return the user to the host app

Preview: https://www.youtube.com/shorts/Vc836AyeEw0

I cannot find any supported way to programmatically return to the previous app. I've researched:

  • _hostBundleID - Private API, blocked in iOS 18+
  • suspend() on UIApplication - Goes to home screen, not previous app
  • x-callback-url - Requires host app cooperation
  • LSApplicationWorkspace - Private API, requires knowing the bundle ID

Apps like Wispr Flow or Whisper achieve this automatically. When you tap their mic button:

  1. Wispr app opens briefly
  2. User is automatically returned to the host app
  3. This works even when Wispr Flow or Whisper was force-closed

Their FAQ says "Not all apps allow the app to reopen" suggesting it's selective, but it works for major apps like Messages, Maps, etc.

  • Is there a supported API for keyboard extensions to return to the previous app?
  • How do apps like Wispr Flow achieve this? Are they using private APIs that Apple permits?
  • Should I file a Feedback request for this functionality?

I've seen thread 126107 and thread 52300 which confirm no public API exists, but those are from 2019-2020. Has anything changed?

Environment:

  • iOS 18.4 / iOS 26
  • Xcode 16
  • Swift 5

Any guidance appreciated!

Such Apple-specific questions are best asked over at the Apple Developer forum. This forum is about the open-source Language Swift, not a forum for any Apple specific frameworks / questions.

1 Like

My apologies, @NotTheNHK.

It’s just forum policy, but you’re more than welcome to take part in any Swift related discussion here!