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

倾然丶 夕夏残阳落幕 提交于 2019-12-28 03:40:20

问题


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.


回答1:


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




回答2:


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

Image to add:




回答3:


I faced the same error and its fixed by following these page instructions:

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




回答4:


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"




回答5:


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




回答6:


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.




回答7:


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.




回答8:


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




回答9:


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.




回答10:


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.




回答11:


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




回答12:


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



来源:https://stackoverflow.com/questions/23780432/xcode-error-while-validation-your-binary-is-not-optimized-for-iphone-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!