English | 中文
Reverse engineering the iOS Simulator: tracing status bar overrides from CoreSimulator all the way to SpringBoard, reconstructing iOS 17.4 & iOS 27.0 status bar icons down to 0-pixel RGBA diff, and building tools that drive the live simulator status bar without xcrun simctl.
All geometric reconstructions were verified directly against exported SpringBoard layers, paths, and rendered simulator screenshots (baseline commit 33c5722):
| Area | Verification Scope & Result |
|---|---|
| Battery Cap & Geometry (iOS 17.4) | 0 control-point diff across 8 cap paths (circle ∩ rect arc slice vs. complex dual-corner branch) |
| Signal Icons (iOS 17.4) | 0 alpha diff across 84 rendered Wi-Fi & cellular images across notch / Dynamic Island sizes |
| New Wi-Fi & Cellular (iOS 27.0) | 0 RGBA diff across 190 Wi-Fi renders (19 states); ≤ 1.78e-15 error across 480 cellular bars |
| Provider & Style Selection | 516 comparisons on iOS 17.4 + 171 on iOS 27.0 mapping display geometry → provider → iconScale → iconSize & per-item rounded |
| Apple Sketch vs. Runtime | Read iOS 18 & 27 Apple Sketch files (10 consistent cache/original records): normal battery fill r=2.5 (border r≈4.3), Control Center fill r≈3.33, CC cap = Oval − Rectangle (booleanOperation=1) |
| State Replay | 6 replay suites passed across iOS 17.4 and 27.0 (10 checked screenshots + 3 comparison figures) |
| Component | Description |
|---|---|
simre |
Swift CLI (Sources/simre/) that lists, boots, shuts down, and overrides simulator status bars without linking private frameworks or shelling out to simctl |
StatusBarLab |
SwiftUI app (apps/StatusBarLab/) writing directly to the simulator's status-bar-overrides domain without a host process |
| Low Power Mode | Yellow battery state that neither xcrun simctl status_bar nor SimDevice exposes |
| Disassembly & Probes | Runtime ObjC/Swift introspection (simprobe), SpringBoard update tracing (sbtrace), LLDB annotation script (tools/lldb/annotate.py), and automated pixel/path verifiers (tools/battery, tools/signals, tools/providers, tools/sketch, tools/statusbar) |
Rendered directly inside the simulator via StatusBarLab:
Color priority is Low Power > Low Battery > Charging > Default. The lightning bolt is evaluated independently, allowing combinations like red fill + bolt.
simre / simctl
→ SimDevice → CoreSimulatorBridge (inside Simulator)
→ status-bar-overrides domain ← StatusBarLab writes directly here
→ systemstatusd
→ SpringBoard: STUIStatusBarDataAggregator
→ STUIStatusBar on SBStatusBarWindow
A few notable findings from disassembly & runtime probing:
- Xcode 27 replaces
Simulator.appwithDeviceHub.app. - The status bar does not live inside your app process—it is an independent
SBStatusBarWindowhosted by SpringBoard above app windows. - The time override field has no format check (it happily renders
hello). - Battery level
≤ 1%clamps to0; the low-battery threshold is20%(10%constant on iPad). - Forwarding internals inside
systemstatusdremain static-evidence only in this baseline.
Requires macOS, Xcode 27, and the iOS 27.0 Simulator runtime.
Run the SwiftUI lab app:
open apps/StatusBarLab/StatusBarLab.xcodeprojOr build and run the simre CLI:
swift build
.build/debug/simre list
.build/debug/simre boot <name-or-UDID>
.build/debug/simre statusbar <device> time 9:41
.build/debug/simre statusbar <device> battery 1 42 # state: 0 discharging, 1 charging, 2 charged
.build/debug/simre statusbar <device> wifi 3 2 # mode 3 active, 2 bars
.build/debug/simre statusbar <device> clear
.build/debug/simre shutdown <device>Launch StatusBarLab with --demo to cycle through all presets automatically:
xcrun simctl launch <device> dev.ieuforu.StatusBarLab --demo| Path | Contents |
|---|---|
Sources/simre/ |
Host-side Swift CLI |
apps/StatusBarLab/ |
Simulator SwiftUI app and UI tests |
tools/simprobe/ |
ObjC class introspection inside the Simulator |
tools/sbtrace/ |
SpringBoard injection probe for status bar updates |
tools/lldb/annotate.py |
LLDB script annotating constants and ivar names in disassembly |
tools/ovrtest/ |
Early prototypes publishing status bar overrides directly |
tools/battery/ |
Real battery capture, parameter export, independent redraw & pixel diff |
tools/signals/ |
Wi-Fi / cellular probes, SpringBoard capture, redraws & alpha verification |
tools/providers/ |
Provider selection tests, per-item style capture & disassembly export |
tools/sketch/ |
Read-only Sketch hierarchy/geometry/path extractor & source hash verifier |
tools/statusbar/ |
Control Center capture, iOS 27 signal/rule verification, replay & comparison figures |
notes/ |
Detailed research notes (in Chinese) + machine-readable .asm/.json in notes/evidence/ |
- Architecture & Device Boot
- Status Bar Pipeline & App Internals
- Reconstructing the Battery View from Disassembly
- Legacy Battery Icon: iOS 17.4
- Modern Battery Icon: iOS 27
- Legacy Battery Cap, Continuous Corners & Path Verification
- Legacy Wi-Fi, Cellular & Notch / Dynamic Island Geometry
- Provider Selection,
iconSize& Per-ItemroundedOverrides - Two Apple Sketch Files: Normal Status Bar vs. Control Center
- From Design Files to Runtime: Expanded Mode, New Wi-Fi & Corner Tables
- Experiments cover Xcode 27.1 and selected samples on iOS 17.4 / 27.0 Simulator runtimes; iOS 18 values come from Apple Sketch files only (no iOS 18 runtime dynamic verification).
- Simulator-only: private APIs are volatile and cannot be shipped on real devices or the App Store.
- Out of scope: real hardware, full RTL, dual-SIM, landscape, Display Zoom, full search-animation frames, and secondary indicators (location, VPN, call/recording pills, iPad/CarPlay).
- Running
xcodebuild testwhileDeviceHubis open was observed to shut down simulators and exitDeviceHub.
Personal research project, not affiliated with Apple. Reconstructed algorithms and code are independent research derived from disassembly and runtime measurements, not Apple original source code; Sketch measurements retain their design-file provenance and do not claim equivalence to runtime rendering.




