ios 验证时 Xcode 错误 - “您的二进制文件未针对 iPhone 5 进行优化”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23780432/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 00:10:18  来源:igfitidea点击:

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

iosiphoneios7app-storexcode5

提问by Khairil Ushan

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

在此处输入图片说明

采纳答案by Irfan

Are you sure the 568h file is actually in PNGformat? 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.

您确定 568h 文件实际上是PNG格式吗?还要确保您为所有屏幕提供了对 iphone 5 的支持?仅添加[email protected]并不能保证对 iphone 5 的支持。您必须检查 iphone 3.5" 和 4" 设备的所有视图的框架。

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

请查看此链接:您的二进制文件未针对 iPhone 5 进行优化

回答by thatzprem

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

将此图像(默认值[email protected])添加到项目的顶层,如下所示。

enter image description here

在此处输入图片说明

Image to add: enter image description here

要添加的图像: 在此处输入图片说明

回答by Afzaal Ahmad

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/

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

回答by joey

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"

我在 iOS 9 中使用多个故事板时遇到了这个问题。我通过转到项目目录 --> 常规,然后对于“启动屏幕文件”,选择“主”来解决它

回答by Tai Le

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

我刚刚选择了:“不要使用资产目录”,然后将屏幕截图照片添加到:支持文件中。

enter image description here

在此处输入图片说明

回答by iGW

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.

我也遇到了同样的问题,并找到了步骤中描述的解决方案:- 1)我已将所有默认 png 移动到我的项目的根目录。2) 向根添加了另一个大小为 {320,568} 的 Default-568h。

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

我的根目录下只有四个文件:- 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.

上述解决方案适用于我,而无需在 .plist 中添加 UILaunchImages 键。

回答by Dhanraja

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.

我在我的启动图像中发现了这个问题。我犯了一个错误,将 .jpeg 图像转换为 .png 格式,然后将图像添加到启动图像。这就是向 iTunes 提交应用程序时经常出现错误消息的原因。

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

为了解决这个问题,我从 Photoshop 中获取了 .png 格式的新图像并将它们添加到 Launch Images。

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

之后,我尝试提交应用程序并成功提交。

This method be helpful for other.

这种方法对其他人有帮助。

回答by Mina Fawzy

For Xcode 6

对于 Xcode 6

you must make sure you check in iOS 6 and prior sizes in both LaunchImagesand AppIconin Images.xcassets

您必须确保在Images.xcassets 中的 LaunchImagesAppIcon中检查 iOS 6 和之前的尺寸

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

请看这里我在Xcode 6 error msg“Targeting releasebefore iOS 7.0 ...”之前回答了这个问题

回答by rob5408

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.

一个极端情况,但如果您错误地添加了后来没有使用的本地化(因此没有添加 iPhone 5 启动图像),我就会发生这种情况。从项目导航器中选择项目。在中间窗格中选择查看项目(而不是目标之一)。在信息选项卡中,滚动到底部并确保没有无关的本地化。

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.

编辑:重新阅读错误消息我想它确实避免了这一点,但有时错误消息没有意义,除非您以另一种方式弄清楚它的含义。

回答by Mick Byrne

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.

文件名显示正确,但出现错误。这是通过单击本部分表格中列出的每个启动图像旁边的小文件夹图标并在我们项目的资源文件夹中找到正确的文件来解决的。