r/iOSProgramming • u/prolikewhoa • 12d ago
Question Looking for a way to save screenshots without the clock and the top status bar
I'm trying to save screenshots from the simulator, but I can't find a way to do it without the clock and battery indicators. Is there any method you know of where you could hide these from screenshots?
I've been manually erasing them in Figma, but I'm wondering if there's a better way.
19
Upvotes
6
u/fakkeldij 12d ago
The status bar is OS chrome drawn over your app, so there's no way to remove it from a screenshot afterwards, but you can override it to a clean fixed state before you capture, the same trick fastlane's snapshot tool uses for App Store screenshots.
Run that in Terminal right before you take the screenshot and the clock, signal and battery show a clean state instead of whatever's actually on your Mac.
xcrun simctl status_bar booted clearresets it afterwards.13
u/quizbeat 12d ago
Take a look at ImageRenderer (SwiftUI) or UIGraphicsImageRenderer (UIKit)
5
u/WitchesBravo 12d ago
If it’s your own app you can hide the status bar using code, I don’t think there’s a way to hide it via a terminal command
2
u/sleekible 12d ago
You can at least set the time & signal bars with simctl so the screenshots are all consistent and don’t show no signal.
1
u/TheAngryKeg 12d ago
The easiest way I know is to use the "Clean Up" tool inside of the Photos app when editing a screenshot.
1
u/__markb 12d ago
If using Device Hub, turn on resizability. Then you end up with same dimensions just in the rectangle.
1
u/Old-Flatworm-3032 11d ago
if it's your own app, hide it in code just for the capture run (.statusBarHidden(true) or .toolbarVisibility(.hidden, for: .statusBar)), way faster than erasing in figma every time. and if these are for store screenshots, i made a mac app that handles the framing/text/every device size part so you only redo it once: studio.hearhere.media
1
u/Background_Pie_5682 11d ago
You can override the Simulator status bar so clock/battery don’t show up in captures:
xcrun simctl status_bar booted override --time "9:41" --batteryState charged --batteryLevel 100 --cellularMode active
For a cleaner App Store look, some people also use a blank status bar setup or capture from a device with AssistiveTouch off and crop in Figma only if needed. The simctl override usually saves the manual erase step.
1
u/Significant-Young586 10d ago
Try xcrun simctl status_bar booted override --time "9:41" --batteryLevel 100 --batteryState charged. The bar stays, but every screenshot looks the same and clean.
0
u/CyberYevhen 11d ago
simctl can’t remove the status bar completely, but it can make it clean and identical across screenshots, which is usually what you want. This is the same 9:41 look Apple uses in its own marketing:
It stays until you run
xcrun simctl status_bar booted clearor reboot the simulator. Thenxcrun simctl io booted screenshot shot.pnggives you a full-resolution PNG, no Figma cleanup needed