Utilities for setting and clearing the iOS Simulator status bar time across all currently running (booted) simulators. Useful for consistent screenshots, demos, and UI tests.
- Set a fixed clock time on every booted iOS simulator (
simtime.py). - Clear status bar overrides on every booted iOS simulator (
simclear.py). - Works with multiple simulators at once.
- macOS with Xcode installed (includes the iOS Simulator).
- Xcode command line tools with
xcrunavailable. - Python 3.8+.
You can verify simctl availability with:
xcrun simctl help status_bar- Boot one or more iOS simulators (for example):
open -a Simulator
# or boot a specific device
xcrun simctl boot "iPhone 15"- Set a fixed clock time (24‑hour HH:MM):
python3 simtime.py 09:41- Clear the status bar override when finished:
python3 simclear.py-
simtime.py- Sets the status bar time for each booted iOS simulator via
xcrun simctl status_bar <UDID> override --time <HH:MM>. - Validates basic time format
HH:MM(24-hour). - Skips non‑iOS devices and only affects booted simulators.
- Sets the status bar time for each booted iOS simulator via
-
simclear.py- Clears the status bar override for each booted iOS simulator via
xcrun simctl status_bar <device> clear. - Only affects booted simulators.
- Clears the status bar override for each booted iOS simulator via
- Set time to 02:25 across all booted simulators:
python3 simtime.py 02:25- Clear time/status bar override across all booted simulators:
python3 simclear.py- These scripts override only the status bar time; they do not change the simulator’s system clock or timezone.
- If no simulators are booted, the scripts will print a helpful message and exit.
- Device matching in
simctlcan use either UDID or name; using UDID avoids ambiguity when multiple devices share the same name.
xcrun: error: unable to find utility "simctl"→ Ensure Xcode and its command line tools are installed, then runxcode-select --installor select the correct developer path viasudo xcode-select -s /Applications/Xcode.app.- "No running iOS simulators found" → Launch one with
open -a Simulatororxcrun simctl boot <device>. - Time format must be
HH:MM(e.g.,09:41).
Consistent clock time is often required for screenshots, marketing assets, documentation, and visual diffs in UI testing. These utilities make that repeatable across multiple simulators with a single command.