34

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

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
Khairil Ushan
  • 2,358
  • 5
  • 26
  • 29
  • Add icons with size of 120 , 152 , 76 in above the 7.0 version this three sizes icon is required. – Darshan Kunjadiya May 21 '14 at 10:29
  • oh, so if i add that 3 icon size it will effect(fix) the error on the point 1 ? – Khairil Ushan May 21 '14 at 10:34
  • Your Application must support iOS 7 and iPhone5. for that you have to add icons, splash screens with specific pixel in size. – ChintaN -Maddy- Ramani May 21 '14 at 10:39
  • yes my app need to support ios 7 and run on iphone 5. i have had 3 kind of splash image with different size 320x480, 640x960 and 640x1136 . i will try to add missing icon based on @DarshanKunjadiya answer. will let you now soon if it fix my problem. thanks for helping . :) – Khairil Ushan May 21 '14 at 10:42
  • hei @DarshanKunjadiya , i have add that 3 icon size, it just solve the warning, but the error on the point 1 sill there. – Khairil Ushan May 21 '14 at 11:00
  • Simply including the new splash screen image (Default-568h@2x.png) is not enough You must re-build your project with the iOS 6.0 SDK (or newer) - which supports iPhone 5 So if you're still using an older SDK, update your XCode in the App Store first – Darshan Kunjadiya May 21 '14 at 11:02
  • 2
    and check this link also http://dannysu.com/2014/04/16/not-optimized-for-iphone5/ – Darshan Kunjadiya May 21 '14 at 11:03
  • http://stackoverflow.com/questions/16850903/invalid-binary-your-binary-is-not-optimized-for-iphone-5-as-of-may-1 – Darshan Kunjadiya May 21 '14 at 11:05
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/54168/discussion-between-darshan-kunjadiya-and-rr12). – Darshan Kunjadiya May 22 '14 at 04:41
  • This question is off-topic because it is about App Store compliance, not a coding issue. Please see [Are developer-centric questions about application stores on topic for Stack Overflow?](http://meta.stackoverflow.com/q/175701) – jscs Sep 06 '14 at 18:46

12 Answers12

24

Add this image (Default-568h@2x.png) to in your project at the top layer as below.

enter image description here

Image to add: enter image description here

thatzprem
  • 4,697
  • 1
  • 33
  • 41
  • I right-clicked on the black image and save it in 'Downloads'. Then I dragged and dropped the image into my project and renamed it to: Default-568h@2x.png. I get no errors anymore when uploading a new binary package to iTC. –  Dec 13 '15 at 12:32
  • 1
    I also downloaded the image. The name of the images has to be 'Default-568h@2x.png' - or it doesn't work – user1435853 Sep 29 '16 at 18:25
  • I have been dealing with this for 2 days now. I tried the above but still get the error, so frustrating. – covard Nov 28 '18 at 21:31
  • NM I'm an id10t and had the file named Default-528@2x.png, renaming it fixed it thank you so much. – covard Nov 28 '18 at 21:37
18

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 Default-568h@2x.png 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

Irfan
  • 4,301
  • 6
  • 29
  • 46
  • yes my 568h@2x image is a png. is the "Default" on the name is a must ? – Khairil Ushan May 21 '14 at 10:45
  • yes it is must, it should be like this Default-568h@2x – Irfan May 21 '14 at 10:46
  • 1
    I don't think the name format is a "must" if you use [xcassets](https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/Recipe.html) to setup your launch images. – A-Live May 21 '14 at 11:15
  • 1
    yes you are right but if we don't use xcassets then it is "must". – Irfan May 21 '14 at 11:22
  • 1
    hi @Irfan , thanks for the link, got good one from there, i solve my problem by changing to Asset Catalogue mode in general settings (just like an example from ur link). and i do the same with your link and i see that there's another part that still missing image, so i just add it and problem solve. and i uncheck all part that i don't need (in my case all landscape launch images) . thanks. – Khairil Ushan May 21 '14 at 17:10
10

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/

usmanali
  • 2,028
  • 2
  • 27
  • 38
Afzaal Ahmad
  • 816
  • 10
  • 16
7

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"

jjjjjjjj
  • 4,203
  • 11
  • 53
  • 72
  • I removed all of my launch images and added an empty storyboard. then the error went away. – K.. Dec 18 '18 at 16:28
6

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

enter image description here

Tai Le
  • 8,530
  • 5
  • 41
  • 34
2

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} , Default-568h@2x.png {640,1136} , Default.png {320,480} , Default@2x.png {640,960}.

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

iGW
  • 633
  • 5
  • 14
2

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.

Dhanraja
  • 211
  • 2
  • 13
1

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 ..."

Community
  • 1
  • 1
Mina Fawzy
  • 20,852
  • 17
  • 133
  • 156
0

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.

Mick Byrne
  • 14,394
  • 16
  • 76
  • 91
0

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.

rob5408
  • 2,972
  • 2
  • 40
  • 53
0

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

-1

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."

Community
  • 1
  • 1
jsherk
  • 6,128
  • 8
  • 51
  • 83