While working on my mobile application Elite Ice Hockey Action, I recently released an update and discovered that I need to add new App Store screenshots for the iPhone 6 and 6+.

Based on the App Store screenshot guidelines the images uploaded should not contain the iOS status bar (containing the time, battery level etc.). However, when using the iOS simulator for taking screenshots the status bar is always visible and simply cutting it out in Photoshop or Preview is not an option because since the iPhone 6 was released the screenshot dimensions must be exactly the same as the iPhone it was taken on.

There appears to be no way to simply turn off the status bar from the iOS simulator so my only option is to temporarily hide the status bar programmatically in Xcode and then disable this effect again after gathering my images.

Read on to find out the steps I performed to achieve this goal.

The general process will be to add 2 new properties to the info plist that will hide the status bar.

1. Locate the Info Property list

In my case this was located under Resources with the name Elite Ice Hockey Action-Info.plist. This file name will be different and specific to your project.

Find info.plist

2. Add property "View controller-based status bar appearance" with value "NO"

To add a new row to the property list, right click below the current entries and click Add Row.

Add row

Next type in View controller-based status bar appearance as the key. Xcode will help you auto-complete this. Set the value to NO.

Add first property

3. Add property "Status bar is initially hidden" with value "YES"

Next repeat the previous step but instead the key is named Status bar is initially hidden and set the value to YES.

Add second property

4. Disable any code to push the view down

In my personal case I use a snippet of code in the method - (void)viewWillAppear:(BOOL)animated in the file MainViewController.m that will move the view below the status bar, so that my content does not sit under it.

If you have something similar, comment this out now or a white bar will be left at the top of the screen. You can use the shortcut Cmd + / to toggle commenting on a code block.

Disable view push code

5. View the results

That's it! Now run the application in the the iOS simulator and the status bar will be gone. Simply press Cmd + S save the current screen. You'll find the screenshot file saved on the desktop.

View results in iOS simulator

6. Revert the effect

After you are finished with all screenshots you can revert the changes easily by first uncommenting any changes you made from step 4 in MainViewController.m.

Finally set the value of Status bar is initially hidden in the info plist to NO.

Revert effect after screenshots

Final thoughts

I spent some time researching an easy way to take status bar free screenshots on iOS and did not find any easy solutions. The iOS simulator does not allow hiding of the status bar, any OS X tools that exist to help you are outdated and Apple does not seem to give any advice.

Based on this, my solution in this post has been the simplest and most pragmatic that I have found.

If you know of a better way to achieve this, I would be very happy to find out.