Search code examples
iosxcodeautolayoutxcode-storyboard

Two targets share a Launch Storyboard, one background image works, the other does not


This issue has been driving me rather nuts. I've made a small demo project that replicates the issue here: https://www.dropbox.com/s/b5dwcat02q0rx5a/LaunchTest.zip?dl=0

There is a single LaunchStoryboard that is in both targets. Each target has a different asset folder assigned, with the same names for the image assets.

The first targets runs and shows the launch screen correctly. The second target only shows a blank screen. Removing the background image in the storyboard causes it to launch normally on the second target. Copying the same background image from the first target to the second also works.

I've tried swapping the targets, many iterations of different image formats, color profiles and compression to no avail (wiping simulator between each test). I need to understand why the second target fails so I can fix the original project.


Solution

  • The issue was the background file size on the second target. I had tried shrinking it, but not far enough! Some trial and error testing put the upper size for it around 1.7MB.