19
votes

I am trying to submit my first app to the App Store but when I try I am getting the following error:

ERROR ITMS-9000: "Your binary is not optimized for iPhone 5 - New iPhone apps and app updates submitted must support the 4-inch display on iPhone 5 and must include a launch image referenced in the info.plist under UILaunchImage with a UILaunchImageSize value set to {320, 568}. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .lproj folder if you localize your launch images.

Inside Images.xcassets there is no LaunchImage files.

I have no idea what is wrong, I am using the LaunchScreen.xib for my launch screen and it's working on my iPhone 6 and iPhone 5 screen. I am using Xcode 6.0.1 (6A317).

Any clues of what may be wrong?

Thanks!

6
Apple's error messages tend to be pretty clear. Work through the message you have and make sure your bundle meets all their requirements.user1864610
Does your app support iOS 7 or earlier in addition to iOS 8? If so you need the 4" launch image, just as described in the error message.rmaddy
It does, it's iOS 7+, where does that image go? And how would I reference it in the info.plist? @rmaddy thanksJose Zamudio
I followed the answer in this post: stackoverflow.com/questions/18976412/…Jose Zamudio
I have the same error with deployment target iOS 8. What's wrong on that case? stackoverflow.com/questions/27136053/…Dmitry

6 Answers

27
votes

This problem appears when you use a xib or storyboard as your launch screen. This was a new feature for iOS 8 (so it's not available in iOS 7). Since Apple didn't drop yet support for iOS 7, they maintain the need to supply the Launch screens for this version also.

You can change to Images.xcassets as the chosen answer is, but then if you want to use LaunchScreen.xib (as you invoked) for iOS 8+ devices, all you need to do is to create also the LaunchScren images the old way:

  • add to your plist file the a new row named UILaunchImages of type Array.
  • add a new item in your array (Item 0) of type Dictionary.
  • add a new item in the Dictionary with the key UILaunchImageName and the value Default.
  • add to your bundle 2 images named : Default-568h.png of size (320x568) and [email protected] (640x1136).

If you want your app to run on other older devices with iOS 7, you can add also the 4s size, iPad size etc. as the Default images.

7
votes

If you are working with Images.xcassets make sure in your projects settings, General > App Icons and Launch Images > Launch Image Source is set.

3
votes

I had a slightly corrupted PNG that was causing the issue - everything else was totally fine.

Basically the automated export feature from a PSD I was using exported as a JPG and I changed the extension to PNG and whilst it looked like it was okay and loaded fine in in Preview, but the file wasn't a legit PNG.

TL;DR check that your assets are valid.

3
votes

add the below in info.plist

<array>
<dict>
<key>UILaunchImageName</key>
<string>Default</string>
</dict>
</array>

And also add 320x568 and its 2x image, 640x1136 for iPhone and for iPad 768x1024 in the source bundle. If these are not done Validation will result in errors.

0
votes

You can refer the solution via this link

Your binary is not optimized for iPhone 5

The problem has solved when I do this:

  1. I have removed laungh images' xcassets totally
  2. added the launch image set
  3. and added all launch images again
  4. created a new ipa again

and this time its successfuly submitted.

0
votes

My splash image was set as 320x568, I changed it to 568x320. Fixed the problem. So simple, and so much time burned.

My file had the name: Default-568h~iphone.png (the word "Default" is interchangeable with almost anything)

I was exporting/publishing via Adobe Animate