SimulatorStatusMagic

Clean up your status bar for taking screenshots on the iOS simulator.

Github星跟踪图

Simulator Status Magic

Modify the iOS Simulator so that it has a perfect status bar, then run your app and take perfect screenshots every time. The modifications made are designed to match the images you see on the Apple site and are as follows:

  • 9:41 AM is displayed for the time.
  • The battery is full and shows 100%.
  • 5 bars of cellular signal and full WiFi bars are displayed.
  • Tue Jan 9 is displayed for the date (iPad only)

Xcode 11 beta 4 and simctl status_bar! ?

Xcode 11 beta 4 includes support for perfect status bars without SimulatorStatusMagic! ? Run xcrun simctl status_bar with beta 4 or later installed and rejoice! This project will be going away soon, which is great news.

How do I use it?

  • Clone this repository.
  • Open SimulatorStatusMagic.xcodeproj with Xcode 6 (or above).
  • Run the app target SimulatorStatusMagic (not SimulatorStatusMagiciOS) on whichever simulator type you would like to modify (it works with every device).
  • Once the app launches, press the only button on the screen :)
  • That's it, you're done! Now just run your app and take screenshots.

How do I remove the customisations?

Run the app again and click "Restore Default Status Bar". Resetting the iOS Simulator using the normal menu option also works.

I have a script to take my screenshots, can I automate this?

Yes! SimulatorStatusMagic is available via CocoaPods, Carthage and as a standalone source release. Installation instructions are available.

It is recommended to only include SDStatusBarManager in your debug configuration so that the code is never included in release builds. When you want to apply a perfect status bar, call [[SDStatusBarManager sharedInstance] enableOverrides]. To restore the standard status bar, call [[SDStatusBarManager sharedInstance] disableOverrides].

What about automation of the sample app?

If you'd prefer to automate the app itself to automatically enable or disable the overrides, this can be done with environment variables.

Run with:

SIMULATOR_STATUS_MAGIC_OVERRIDES = enable

or

SIMULATOR_STATUS_MAGIC_OVERRIDES = disable

The overrides will be automatically enabled or disabled on launch.

Does this work on device?

No. The status bar server is blocked on devices. However, macOS includes the facility to include a perfect status bar when recording your device screen with QuickTime (Read more).

How does this work?

The best idea is to check the source code which should get you started with how it works :)

Contributing

We'd love contributions and even have some suggestions for things that might need working on:

  • Found a bug? If you report it with a pull request attached then you get a gold star :)
  • Non-English language support. We'd love it to work with more languages. Now works with every language!

However, the scope of this project is intentionally limited. We're not planning to add options to this to allow ultimate customisation of the status bar. It's intended to do just one job really well, change the status bar to match Apple's marketing materials.

主要指标

概览
名称与所有者shinydevelopment/SimulatorStatusMagic
主编程语言Objective-C
编程语言Objective-C (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2014-10-07 18:49:26
推送于2025-09-12 16:24:06
最后一次提交2025-09-12 16:24:02
发布数27
最新版本名称2.7 (发布于 )
第一版名称1.0 (发布于 )
用户参与
星数2.4k
关注者数33
派生数136
提交数278
已启用问题?
问题数43
打开的问题数2
拉请求数68
打开的拉请求数0
关闭的拉请求数14
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?