12

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?

9

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.

| improve this answer | |
  • Thanks, my iOS Simulator gives me low battery anxiety when it shows the red warning icon. This saved my day! – SacWebDeveloper Jun 9 at 17:41
  • 1
    Use booted instead of <device> to apply the settings to all running simulators. – testing Aug 26 at 9:54
5

There are 2 ways to do this:

1. Clone, build and run SimulatorStatusMagic in your simulator.

This will only work for your simulator.

https://github.com/shinydevelopment/SimulatorStatusMagic

cd ~/Desktop
git clone git@github.com:shinydevelopment/SimulatorStatusMagic.git
cd ~/Desktop/SimulatorStatusMagic
open SimulatorStatusMagic.xcodeproj/
# Build the "Framework" Target
# Build & RUN the "SimulatorStatusMagic" in your Emulator

2. via QuickTime Player:

This will only work for your device.

  • Connect your own device to your Mac.
  • Open "QuickTime Player" (Install if required)
  • File → New Movie Recording
  • Click the dropdown next to the Red Record button
  • Select your iPhone e.g: "Anil's iPhone"
  • Record and bring your screen up, then Stop the recording.
  • Now you can "Play" your recording, find the screen you want, pause it,
    Edit Menu → Copy (will copy the screen grab).

Both should result in something like this (Time 9:41 AM - Full Battery and Wifi):

How to take a 9 41 AM iPhone Screenshot

| improve this answer | |
  • Do I need to build this before every time I want to build an app of mine for screenshots? (after quitting Xcode) – Daniel Springer Dec 31 '18 at 22:18
  • This tool is useful if you have iOS 12 or lower and/or Xcode 10 or lower. – testing Aug 26 at 15:15
0

Fix it in post production with Photoshop or Pixelmator or Acorn and your video editor of choice as you are in good company to want to pay attention to these details to build trust and reputation for attention to detail.

One screen shot at the right time with light and dark backgrounds let you adjust the battery level, bars, time and more to suit your needs.

There are even plug in to the simulator that will programmatically clean up the status bar for more than just time if you are running your code that way and not on a device:

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .