Khairil Ushan
Khairil Ushan

Reputation: 2458

Xcode error while validation - "Your binary is not optimized for iPhone 5"

Just got stuck with this error while I'm trying to publish an app to app store. Sorry because i cant copy-paste the error code so I will post an image in my question.

enter image description here

Upvotes: 34

Views: 34928

Answers (12)

Vincent Polidoro
Vincent Polidoro

Reputation: 46

I tried a number of solutions and nothing worked, final solutoin was to use the RN toolbox to add a Splash screen which corrected whatever configuration was triggering the error: https://github.com/bamlab/generator-rn-toolbox

Upvotes: 0

Dhanraja
Dhanraja

Reputation: 211

I have been getting this issue since last two days.

I found this issue in my splash images. I made a mistake by converting .jpeg images to .png format and then adding the images to Launch images. That is the reason for the frequently appearing error message on submitting an app to itunes.

To rectify this issue, I took new images in .png format from Photoshop and added them to Launch Images.

After that, I tried to submit the app and it got submitted successfully .

This method be helpful for other.

Upvotes: 2

jjjjjjjj
jjjjjjjj

Reputation: 4493

I ran into this problem when I was using multiple storyboards in iOS 9. I solved it by going to Project Directory --> General, then for "Launch Screen File", selecting "Main"

Upvotes: 7

rob5408
rob5408

Reputation: 2982

An edge case, but I've had this happen if you mistakenly added localizations that you later didn't use (and therefore didn't add an iPhone 5 launch image). Select the project from Project Navigator. In the middle pane choose to view the Project (as opposed to one of the Targets). In the Info tab, scroll to the bottom and make sure there are no extraneous localizations.

Edit: Rereading the error message I guess it does elude to this, but sometimes an error message doesn't make sense until you figure out what it means another way.

Upvotes: 0

iGW
iGW

Reputation: 643

I was also suffering from same problem and found solution as described in steps:- 1) I have moved all default png's to the root of my project. 2) Added another Default-568h of size {320,568} to the root.

I have only four files at my root:- Default-568h.png {320,568} , [email protected] {640,1136} , Default.png {320,480} , [email protected] {640,960}.

The above solution works for me without adding UILaunchImages key in .plist.

Upvotes: 2

thatzprem
thatzprem

Reputation: 4767

Add this image ([email protected]) to in your project at the top layer as below.

enter image description here

Image to add: enter image description here

Upvotes: 24

Afzaal Ahmad
Afzaal Ahmad

Reputation: 845

I faced the same error and its fixed by following these page instructions: enter image description here

http://dannysu.com/2014/04/16/not-optimized-for-iphone5/

Upvotes: 10

Mina Fawzy
Mina Fawzy

Reputation: 21452

For Xcode 6

you must make sure you check in iOS 6 and prior sizes in both LaunchImages and AppIcon in Images.xcassets

Please have a look here I have answer this question before Xcode 6 error msg "Targeting releases prior to iOS 7.0 ..."

Upvotes: 1

Tai Le
Tai Le

Reputation: 9256

I just selected: "Don't use asset catalogs" and then add screenshots photo into: Supporting Files.

enter image description here

Upvotes: 6

jsherk
jsherk

Reputation: 6472

In response to this closed question (https://stackoverflow.com/questions/25699733/invalid-binary-your-binary-is-not-optimized-for-iphone-5) ...

One solution is that you need to use Xcode 5.1.1 per Apple http://developer.apple.com/news/?id=04252014a "Starting May 15, 2014, new apps and app updates submitted to the App Store must be built with Xcode 5.1.1."

Upvotes: -1

Mick Byrne
Mick Byrne

Reputation: 14484

Make sure also that you're pointing at the files in the correct location. We just had this problem after:

  • Going to the 'General' tab on the target screen.
  • Clicking on the 'Don't use asset catalogs' button.

The names of the files appeared correctly, but we had the error. This was solved by clicking the little folder icon next to each of the launch images listed in the table in this section and finding the correct file in our project's Resources folder.

Upvotes: 0

Irfan
Irfan

Reputation: 4331

Are you sure the 568h file is actually in PNG format? Also make sure that you provided support for iphone 5 for all your screens? Only adding [email protected] is not gaurantee for iphone 5 support. You have to check for framing of all your view for iphone 3.5" and 4" device.

You can do the framing by code or autoresizing that is other thing.

Kindly check out this link: Your binary is not optimized for iPhone 5

Upvotes: 18

Related Questions