Overview
Restart App fully terminates the app and relaunches it for a clean cold start. Unlike Activate App, which only brings an already-running app back to the foreground, Restart App kills the process first. The app then comes up in its initial state. Use it for steps that test cold-start or first-launch behavior, or to recover from a wedged screen.How to use
Write a step in plain language:Restart the appKill and relaunch the appCold start the app
Restarting a different app
By default Restart App targets the app under test. To restart (launch) a different app, include its identifier in the step:- iOS — the app’s bundle id, e.g.
Restart app com.apple.Preferences - Android — the app’s package name, e.g.
Restart app com.android.settings
Phrase it as restart or relaunch (not “open” or “activate”) and include the
literal bundle id / package name. The agent then launches it as a fresh app instead of
trying to tap an icon.
Restarting with launch arguments or app settings
Two step types restart the app under test with values for one test. Start the step with the exact wording below, then add the values. The wording tells Spur which step to run.
If you’re not sure which one an app uses, check the app’s Settings or debug-menu page. If
the value appears there, use settings.
Launch arguments
- iOS —
-key valuepairs, e.g.Restart the app with launch arguments -AppleLanguages (de) -AppleLocale de_DE - Android — intent extras, e.g.
Restart the app with launch arguments --es key value --ez flag true
App settings
- iOS — e.g.
Restart the app with settings -showOnboarding NO -language fr-FR - Android — e.g.
Restart the app with settings -show_onboarding false -language fr-FR
-language sets the app’s own language on both platforms (Android 13 and later).
Writing values
- Put a value with spaces or
;in quotes, e.g.-greeting "Hello world". - Write a list in parentheses with no spaces, e.g.
(de,en)(iOS). - For settings, Spur writes
YES/NO(ortrue/false) as on/off values and(a,b)as a list. Spur writes anything else as text. On Android, an existing setting keeps its type.
Spur rejects shell characters such as
|, $, and backticks. Parentheses and ; inside a
launch argument are supported on iOS only. Restart with settings needs a rooted Android
emulator (Spur’s emulators are) and works on simulators and emulators, not physical devices.Example use cases
- Cold-start / first-launch testing — verify onboarding or splash behavior
- Recovering a stuck screen — relaunch to a known state mid-test
- Opening system Settings — e.g.
Restart app com.apple.Preferences(iOS) /Restart app com.android.settings(Android) to change a system setting - Region or language for one test —
Restart the app with settings -language de-DE(plus the app’s region setting) instead of navigating Settings
