IOS – How to take 9:41 am screenshots on an iOS Simulator and Device

ios-simulatormacosscreen capture

I know that it's possible to record the screen on Yosemite and take screenshots that have 9:41 am. Is this same functionality possible with the Simulator?

Best Answer

Starting with Xcode 11 beta 4, you can use the xcrun simctl command to set the time and battery in the Simulator.

xcrun simctl status_bar <device> override --time "9:41" \
    --batteryState charged --batteryLevel 100

Example of usage:

xcrun simctl status_bar "iPhone 11 Pro Max" override --time "9:41" \
    --batteryState charged --batteryLevel 100

The simulator needs to be run before executing the command.

See https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_4_release_notes for more details.