xcode 您的二进制文件未针对 iPhone 5 进行优化
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26373958/
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
Your binary is not optimized for iPhone 5
提问by Jose Zamudio
I am trying to submit my first app to the App Store but when I try I am getting the following error:
我正在尝试将我的第一个应用程序提交到 App Store,但是当我尝试时出现以下错误:
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.
错误 ITMS-9000:“您的二进制文件未针对 iPhone 5 进行优化 - 提交的新 iPhone 应用程序和应用程序更新必须支持 iPhone 5 上的 4 英寸显示屏,并且必须包含在 UILaunchImage 下的 info.plist 中引用的具有 UILaunchImageSize 值的启动图像设置为 {320, 568}。启动图像必须是 PNG 文件并位于包的顶层,或者如果您本地化启动图像,则在每个 .lproj 文件夹中提供。
Inside Images.xcassets there is no LaunchImage files.
在 Images.xcassets 中没有 LaunchImage 文件。
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).
我不知道出了什么问题,我在启动屏幕上使用 LaunchScreen.xib,它在我的 iPhone 6 和 iPhone 5 屏幕上运行。我正在使用 Xcode 6.0.1 (6A317)。
Any clues of what may be wrong?
任何可能出错的线索?
Thanks!
谢谢!
采纳答案by David
If you are working with Images.xcassets make sure in your projects settings, General > App Icons and Launch Images > Launch Image Source is set.
如果您正在使用 Images.xcassets,请确保在您的项目设置中,设置了 General > App Icons and Launch Images > Launch Image Source。
回答by Dan Bodnar
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.
当您使用 xib 或故事板作为启动屏幕时,会出现此问题。这是 iOS 8 的新功能(因此在 iOS 7 中不可用)。由于 Apple 尚未放弃对 iOS 7 的支持,因此他们仍然需要为此版本提供启动屏幕。
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:
您可以按照选择的答案更改为 Images.xcassets,但是如果您想对 iOS 8+ 设备使用 LaunchScreen.xib(如您所调用的那样),您需要做的就是以旧方式创建 LaunchScren 图像:
- add to your plist file the a new row named
UILaunchImages
of typeArray
. - 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 valueDefault
. - add to your bundle 2 images named :
Default-568h.png
of size (320x568) and[email protected]
(640x1136).
- 将名为
UILaunchImages
type的新行添加到您的 plist 文件中Array
。 - 在类型为 的数组(项目 0)中添加一个新项目
Dictionary
。 - 使用键
UILaunchImageName
和值在字典中添加一个新项目Default
。 - 将 2 张名为 :
Default-568h.png
的图像添加到您的捆绑包中,尺寸为 (320x568) 和[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.
如果您希望您的应用程序在其他装有 iOS 7 的旧设备上运行,您还可以添加 4s 尺寸、iPad 尺寸等作为默认图像。
回答by Phil Hudson
I had a slightly corrupted PNG that was causing the issue - everything else was totally fine.
我有一个稍微损坏的 PNG 导致了这个问题——其他一切都很好。
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.
基本上,我使用的 PSD 的自动导出功能导出为 JPG,我将扩展名更改为 PNG,虽然看起来没问题并且在预览中加载良好,但该文件不是合法的 PNG。
TL;DR check that your assets are valid.
TL;DR 检查您的资产是否有效。
回答by Neha Vipin
add the below in info.plist
在 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.
并且还在源包中添加 320x568 和它的 2x 图像,640x1136 iPhone 和 iPad 768x1024。如果这些没有完成,验证将导致错误。
回答by airvine
My splash image was set as 320x568, I changed it to 568x320. Fixed the problem. So simple, and so much time burned.
我的初始图像设置为 320x568,我将其更改为 568x320。修复了问题。如此简单,耗费了如此多的时间。
My file had the name: Default-568h~iphone.png (the word "Default" is interchangeable with almost anything)
我的文件名为:Default-568h~iphone.png(“默认”一词几乎可以与任何东西互换)
I was exporting/publishing via Adobe Animate
我通过 Adobe Animate 导出/发布
回答by Ferdy Fauzi
You can refer the solution via this link
您可以通过此链接参考解决方案
Your binary is not optimized for iPhone 5
The problem has solved when I do this:
当我这样做时,问题已经解决:
- I have removed laungh images' xcassets totally
- added the launch image set
- and added all launch images again
- created a new ipa again
- 我已经完全删除了 laungh 图像的 xcassets
- 添加了启动图像集
- 并再次添加所有启动图像
- 再次创建了一个新的ipa
and this time its successfuly submitted.
这次提交成功了。