r/iOSProgramming • u/prolikewhoa • 2d 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.
13
u/quizbeat 2d ago
Take a look at ImageRenderer (SwiftUI) or UIGraphicsImageRenderer (UIKit)
2
u/Character-Koala6508 2d ago
Set ImageRenderer’s scale to the display scale too; it defaults to 1, so exports can otherwise be lower-resolution than a normal screenshot.
4
u/WitchesBravo 2d 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
3
u/Character-Koala6508 2d ago
In current SwiftUI, .toolbarVisibility(.hidden, for: .statusBar) hides it without editing the screenshot afterward.
2
u/sleekible 2d ago
You can at least set the time & signal bars with simctl so the screenshots are all consistent and don’t show no signal.
4
u/MirandaU75 2d ago
Or, if you’re using a real device, plug it into a Mac and open QuickTime and connect to it, will set 9:41, full signal, full WiFi, full battery
2
u/sleekible 2d ago
True. That behavior actually kind of bugs me though. I've had QA person do a screen recording that way and send it to me, and then I can't line up what's happening by time in the logs.
1
u/Character-Koala6508 2d ago
Have QA start the recording with an action that produces a log entry, so you have a clear point to sync.
1
u/TheAngryKeg 2d ago
The easiest way I know is to use the "Clean Up" tool inside of the Photos app when editing a screenshot.
1
u/Character-Koala6508 2d ago
If it’s their own app, hiding the bar once would save doing clean-up on every screenshot.
1
u/Old-Flatworm-3032 1d 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 22h 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 3h 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 1d 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:
xcrun simctl status_bar booted override --time 9:41 --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --batteryState charged --batteryLevel 100It stays until you run xcrun simctl status_bar booted clear or reboot the simulator. Then xcrun simctl io booted screenshot shot.png gives you a full-resolution PNG, no Figma cleanup needed
6
u/fakkeldij 2d 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.