UIScreen MainScreen Bounds returning wrong size

Apparently, iOS relies solely on the presence of a launch image in the resolution of an iPhone 5+ in order to let the app run in that resolution.

There are two solutions to this problem:

1. Use Asset Catalogs

When you create a new project, there’s this thing called an asset catalog which stores your launch image files. Add one of these to your project and presto!

2. Dig out some old files

If you’ve been around XCode for a while, you’ll know that in one of the later versions of XCode 4.x, the app automatically created three default launch image files for your app called Default.png, Default@2x.png, and Default-568h@2x.png. You need these files in your app, which are essentially just black images with the resolutions 480x320, 960x640, and 1136x640, respectively (note that these are in HxW, not WxH).

  1. Add these files to your “Supporting Files” group
  2. Go to the project properties and select “Don’t Use Asset Catalogs” from the Launch Image section
  3. Delete the Asset Catalog.

Hopefully this helps someone else who encounters this ridiculous problem.

Leave a Comment