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?
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 :)