duckduckgo/SimulatorStatusMagic

Name: SimulatorStatusMagic

Owner: DuckDuckGo

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

Forked from: shinydevelopment/SimulatorStatusMagic

Created: 2018-02-08 17:49:48.0

Updated: 2018-03-27 22:33:18.0

Pushed: 2017-12-26 11:24:44.0

Homepage: null

Size: 1516

Language: Objective-C

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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:

How do I use it?
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 for each method.

It is recommended to only include SDStatusBarManager in your debug configuration so that the code is never included in release builds. Then, 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:

LATOR_STATUS_MAGIC_OVERRIDES = enable

or

LATOR_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, this post contains more information on taking perfect screenshots on real devices.

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:

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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.