Fix Siri Shortcuts After Force Quit: App Intents Guide
Why Siri ignores AppShortcuts after force-quitting your iOS app and how to fix it with supportedModes=.any, AppShortcutsProvider, and background execution for voice commands when app isn't running.
Why won’t Siri recognize my AppShortcuts and invoke the AppIntent after I force-quit my app, and how can I enable Siri voice commands to work when the app is not running?
I want users to control my app with Siri voice commands even when the app isn’t running. The phrases defined in my AppShortcuts work when the app is running (foreground or background), but if I kill the app in the app switcher Siri doesn’t recognize the phrases - it doesn’t execute the AppIntent and instead starts a web search or does unrelated actions like playing music. What might cause this behavior and how can I fix it?
Example AppShortcut:
AppShortcut(
intent: OpenAndStartTimerIntent(),
phrases: [
"Restart (.applicationName)",
"Restart the (.applicationName)",
"Restart the timer in (.applicationName)"
],
shortTitle: "Restart Timer",
systemImageName: "arrow.up.circle.badge.clock"
)
Your AppShortcuts stop being recognized after you force-quit because either the App Intent isn’t allowed to run when the app isn’t active (common when supportedModes is .foreground), or iOS treats a user force-quit as an explicit stop that can prevent background relaunch/indexing until the app is opened again. Set the intent’s supportedModes to .any or .background, expose your shortcuts via an AppShortcutsProvider, enable the App Intents capability and Siri/Shortcuts permissions, and test on a real device — these steps let Siri invoke your AppIntent even when the app isn’t running in most cases. If a user explicitly swipes your app away, iOS may still require the user to open the app once to re-register shortcuts or re-enable background invocation.
Contents
- Why Siri ignores AppShortcuts after a force-quit (App Intents & supportedModes)
- How App Intents background execution works (AppShortcutsProvider, perform, openAppWhenRun)
- Step-by-step checklist to enable Siri voice commands when app isn’t running
- Troubleshooting: web search or music instead of your intent
- Testing tips and best practices (phrases, device, Shortcuts app)
- Example: update your OpenAndStartTimerIntent and AppShortcut (illustrative)
- Sources
- Conclusion
Why Siri ignores AppShortcuts after a force-quit (App Intents & supportedModes)
Short answer: Siri only hands an utterance to an App Intent if the system knows the intent can run in the current state and the intent is registered/indexed. If your intent is flagged to run only in the foreground, Siri won’t attempt to launch the app to handle the phrase — it falls back to a web search or a system action (like playing music). The AppCoda writeup shows that supportedModes controls whether an intent runs only in the foreground or can run when the app is not active; changing it to .any or .background permits background invocation in principle (AppCoda).
There’s another wrinkle: when a user force-quits an app from the app switcher, iOS can treat that as an explicit request to stop the app’s background activity. In practice this means Siri and background systems might not immediately relaunch the app until the user opens it again — you’ll see this behavior described in community troubleshooting guides and how-tos (Beebom, MacObserver). So even if your intent has the correct supportedModes, a force-quit can temporarily block the system from invoking it.
Finally, if your AppIntent or AppShortcutsProvider isn’t exposed to the system (missing capability, intent files not included in the target, or provider not implemented), Siri won’t know those phrases exist and will interpret the utterance as a generic command. Multiple sources walk through these configuration pitfalls and how to fix them (CreateWithSwift, GoodRequest).
How App Intents background execution works (AppShortcutsProvider, perform, openAppWhenRun)
Under App Intents, the system may call your intent’s perform() (or equivalent handler) inside your app process or as an extension. To let Siri call your intent when the app is not running:
-
Make sure your AppIntent declares the right execution modes. Example property used by many tutorials:
-
static let supportedModes: IntentModes = .any(or.background) — this tells the system the intent can run without the app in the foreground. See the AppCoda explanation on supportedModes for details (AppCoda). -
If you want the app to open when the shortcut runs (to show UI or a confirmation), set the intent’s open-app option:
-
static let openAppWhenRun = true(this flag is used in examples to request that the system open the app when the intent executes) — GoodRequest’s tips show this pattern when you want the app to appear after Siri invokes the intent (GoodRequest). -
Expose shortcuts via an
AppShortcutsProvider. Implement the provider that returns yourAppShortcutobjects so the system can index phrases globally (so phrases are discoverable by Siri even when the app isn’t currently active) — see the CreateWithSwift walkthrough for example provider usage (CreateWithSwift). -
Don’t forget project-level bits: add the App Intents capability in Xcode (Target → Signing & Capabilities → + Capability → App Intents), and make sure your intent files are included in the app target’s compile sources. If an intent definition file isn’t compiled into the app, it won’t be registered.
-
Permissions and device settings matter: include a Siri usage string in Info.plist (e.g.,
NSSiriUsageDescription) and ensure the user has allowed Siri & Shortcuts for your app in Settings. For background-invocation to behave well, Background App Refresh should be enabled for your app on the device (commitstudiogs, Beebom).
Step-by-step checklist to enable Siri voice commands when app isn’t running
Follow these steps in order — each one addresses a common cause of your exact symptom.
- In your AppIntent type set:
static let supportedModes: IntentModes = .any(or.backgroundif appropriate). This is the single most common fix. See AppCoda.
- If the intent should show UI, add:
static let openAppWhenRun = trueso the system opens the app when executing the command (GoodRequest).
- Implement and register an
AppShortcutsProviderthat returns yourAppShortcut(...)instances so phrases are indexed globally (CreateWithSwift). - In Xcode enable the App Intents capability (Target → Signing & Capabilities → + Capability → App Intents).
- Confirm your intent definition files and provider are included in the app target’s compile sources (missing files = no registration).
- Add
NSSiriUsageDescriptionto Info.plist and confirm the user has allowed Siri & Shortcuts under device Settings. - Ask users to enable Background App Refresh for your app (Settings → General → Background App Refresh) — this helps background invocation behavior (Beebom).
- Test on a physical device — simulators often don’t replicate force-quit and Siri behavior (commitstudiogs).
- If you just changed settings or code, open the app once after install/update or after a force-quit so the system can (re)register and index your shortcuts.
- If users still see fallback behavior, ask them to re-open the app once and then try the voice command again — this often clears the issue caused by a user-level force-quit.
Troubleshooting: web search or music instead of your intent
Why would Siri perform a web search or play music instead of invoking your AppIntent?
- The phrase wasn’t registered or was de-indexed. Verify your AppShortcut appears in Settings → Siri & Search and in the Shortcuts app. If it’s missing, the provider or capability isn’t set up right (CreateWithSwift).
- The phrase is ambiguous. Phrases like “restart” can match system or third-party intents (music, alarms). Use more app-specific wording: “Restart the timer in MyApp.”
- The app was force-quit. iOS may block relaunch until the user explicitly opens the app; a relaunch once typically restores behavior (Beebom, MacObserver).
- Permissions or Background App Refresh disabled. Check both in device Settings.
- Intent file isn’t included in the target or AppShortcutsProvider isn’t returning the shortcut at runtime. Double-check build settings and that provider code runs.
- iOS or Siri bug / version mismatch. Try on the latest iOS build; consult logs via Console.app while invoking Siri to see whether the system attempted to call your intent.
Debug tips:
- Add logging inside your intent’s
perform()so you can see whether it runs. - Use the Shortcuts app to trigger the AppIntent directly (this can help separate phrase recognition from intent execution).
- Watch device console logs during invocation — you’ll see whether Siri matched your app or took a fallback route.
Testing tips and best practices (phrases, device, Shortcuts app)
- Test on a real iPhone running the target iOS version. Don’t rely solely on the Simulator.
- Use long, app-specific phrases during testing to avoid ambiguity.
- Localize phrases if you support multiple locales; Siri matching is language-dependent.
- Encourage early users not to force-quit the app if they want Alexa-like hands-free control; if they do, tell them to open the app once to re-enable voice triggers.
- Provide a Shortcuts-based fallback action users can add that opens your app or triggers the intent — Shortcuts sometimes has a different reindexing path and can be a practical workaround.
- Keep
perform()fast and non-blocking; if you need time, return quickly and continue background work to avoid timeouts.
Example: update your OpenAndStartTimerIntent and AppShortcut (illustrative)
Below is an illustrative skeleton showing the key properties developers commonly set; adapt to your project and Xcode-suggested signatures.
// AppIntent skeleton (illustrative)
struct OpenAndStartTimerIntent: AppIntent {
static let title: LocalizedStringResource = "Open and Start Timer"
// Allow background invocation (so Siri can run it when app isn't active)
static let supportedModes: IntentModes = .any
// Ask system to open the app when running (if you need UI)
static let openAppWhenRun = true
// implement your perform() handler (signature per Xcode)
func perform() async throws -> some IntentResult {
// start or restart the timer...
return .result() // illustrative
}
}
// AppShortcutsProvider skeleton (illustrative)
struct MyShortcutsProvider: AppShortcutsProvider {
static func appShortcuts() -> [AppShortcut] {
return [
AppShortcut(
intent: OpenAndStartTimerIntent(),
phrases: [
"Restart (.applicationName)",
"Restart the (.applicationName)",
"Restart the timer in (.applicationName)"
],
shortTitle: "Restart Timer",
systemImageName: "arrow.up.circle.badge.clock"
)
]
}
}
After updating, build and run on device, ensure the App Intents capability is added, and open the app once to let the system index the shortcuts. If you still see fallback behavior after a force-quit, open the app once and try again — often that clears the block.
Sources
- Integrating Siri Shortcuts into SwiftUI Apps with App Intents — AppCoda
- Unlocking the Power of Apple App Intents — ToTheNew
- App Intents tips and tricks — GoodRequest
- Siri Shortcuts Not Working: 8 Ways to Fix! — Beebom
- How to Close or Force Quit Apps on iPhone and iPad — MacObserver
- Integrating App Intents and Siri Shortcuts in Your Swift App — CommitStudioGS (Medium)
- Performing your app actions with Siri through App Shortcuts Provider — CreateWithSwift
- App Intents frustrations (community notes) — Medium
Conclusion
To get Siri voice commands to work after a force-quit, make your App Intent runnable in the background (supportedModes = .any or .background), expose your AppShortcuts via an AppShortcutsProvider, enable the App Intents capability, confirm Siri/Shortcuts permissions and Background App Refresh, and test on a real device. Keep in mind that user force-quits can temporarily block background relaunches — asking the user to open the app once often restores Siri Shortcuts and App Intents functionality.