Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change status bar on iOS Simulator to Apple default like time: 9:41

I want to take Screenshots with different devices. Is there like a terminal command to change the status bar manually. I know there is xcrun but how do I use it?

like image 710
M_droid Avatar asked Jun 19 '20 07:06

M_droid


1 Answers

Here is the command you need to run on your terminal :

xcrun simctl status_bar booted override --time "9:41" --batteryState charged --batteryLevel 100 --cellularBars 4

This will change the values for all booted simulators.

You can replace 'booted' by the device name (example "iPhone 11 Pro"), or by the UUID of the simulator.

( xcrun simctl list | grep Booted to find UUIDs of running simulators)

And voilà ! You can also change the values for the time and the battery if you want to :)

like image 84
YanouHD Avatar answered Sep 27 '22 17:09

YanouHD