ios 缺少 Retina 4 启动图像。如何忽略此错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12596991/
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-30 20:23:26  来源:igfitidea点击:

Missing Retina 4 launch image. How to ignore this error?

iosios6retina-display

提问by Hlung

Updating Xcode with SDK 6.0 gives you an error when trying to compile your project.

在尝试编译项目时,使用 SDK 6.0 更新 Xcode 会出现错误。

Missing Retina 4 launch image. A launch image named “[email protected]” is required to run at native resolution on Retina 4 devices. Would you like Xcode to add this image for you?

缺少 Retina 4 启动图像。在 Retina 4 设备上以原始分辨率运行需要名为“[email protected]”的启动图像。您希望 Xcode 为您添加此图像吗?

When clicking add, it creates a black launch image of size 640x1136. I know I can easily replace this image with an appropriate one. But XCode is giving me an error and forcing me to have this file. If I don't want to include this, how can I skip this error and just use the shorter launch image already there?

单击添加时,它会创建一个大小为 640x1136 的黑色启动图像。我知道我可以轻松地用合适的图像替换此图像。但是 XCode 给了我一个错误并强迫我拥有这个文件。如果我不想包含这个,我怎么能跳过这个错误而只使用已经存在的较短的启动图像?

Screenshots: http://spacetech.dk/xcode-missing-retina-4-launch-image.html

截图:http: //spacetech.dk/xcode-missing-retina-4-launch-image.html

采纳答案by Hlung

Update: seems like you can't ignore his error. It will eventually fail when you upload the binary. Just provide the retina image. Users will like it :D

更新:似乎你不能忽视他的错误。当您上传二进制文件时,它最终会失败。只需提供视网膜图像。用户会喜欢它 :D

—————

————

It appears to be just a warning when I added that file and then later remove it. This is weirdddd.

当我添加该文件然后将其删除时,这似乎只是一个警告。这是weirdddd。

FYI, by including a Retina 4-inch launch image file ([email protected]) in your target summary, it will force the app to be stretched to full 4-inch display. In order to keep your app to run in 3.5-inch screen mode again, other than removing the 4-inch imageyou also have to **clean your project AND delete the app.

仅供参考,通过在目标摘要中包含一个 Retina 4 英寸启动图像文件 ([email protected]),它将强制应用程序拉伸到完整的 4 英寸显示屏。为了让您的应用程序再次在 3.5 英寸屏幕模式下运行,除了删除 4 英寸图像之外,您还必须**清理您的项目并删除该应用程序。

回答by Zeeshan

Go to project settings, select Generaltab, and go to section mentioned in below image. Here, you only need to specify Launch Image from assets. Hope this helps.

转到项目设置,选择常规选项卡,然后转到下图中提到的部分。在这里,您只需要从资产中指定 Launch Image。希望这可以帮助。

回答by bobobobo

You can't really ignore this error. If you do, you will fail product validation anyway.

你不能真的忽略这个错误。如果这样做,无论如何您都将无法通过产品验证。

This is the text of the error you get:

这是您收到的错误文本:

enter image description here

在此处输入图片说明

So add a 568 launch image, there isn't any way around it.

所以添加一个 568 启动图像,没有任何方法可以解决它。

回答by Malenko

I had a similar problem after I moved my info.plist file into a new group. To fix the problem I reselected my plist file by clicking the "Choose Info.plist File..." button under identity in the general tab of the project file

将 info.plist 文件移到新组后,我遇到了类似的问题。为了解决这个问题,我通过单击项目文件的常规选项卡中身份下的“选择 Info.plist 文件...”按钮重新选择了我的 plist 文件

回答by pulp

Actually you need to provide a set of launch images for your case.

实际上,您需要为您的案例提供一组启动图像。

First, go to Launch Image Attributes Inspector and tick desired device orientations for:

首先,转到 Launch Image Attributes Inspector 并勾选所需的设备方向:

iOS 8.0 and later

iOS 8.0 及更高版本

iOS 7.0 and later

iOS 7.0 及更高版本

and then provide appropriate image sizes for the empty slots.

然后为空槽提供适当的图像尺寸。

For portrait orientation sizes are:

纵向尺寸为:

768x1024 - iPad Portrait @1x

768x1024 - iPad 肖像 @1x

1536x2048 - iPad Portrait @2x

1536x2048 - iPad 肖像 @2x

640x1136 - Retina 4

640x1136 - 视网膜 4

640x960 - iPhone Portrait @2x

640x960 - iPhone 肖像@2x

1242x2208 - Retina HD 5.5"

1242x2208 - Retina HD 5.5"

750x1334 - Retina HD 4.7"

750x1334 - Retina HD 4.7"

回答by Lloyd Sargent

Well, the easiest solution for me was to create the Launch Screen.storyboardand specify that. This gets rid of the need for launch images (unless you really want to go through that song and dance).

好吧,对我来说最简单的解决方案是创建Launch Screen.storyboard并指定它。这消除了对发布图像的需求(除非你真的想通过那首歌和舞蹈)。

Specify the following:

指定以下内容:

enter image description here

在此处输入图片说明

That should solve your problem.

那应该可以解决您的问题。

回答by Nicolas De Tiesenhausen

I had this issue. I cleaned my projet after uploading my new image 640x1136 and the notification disapeared. (Product -> clean ).

我有这个问题。上传我的新图像 640x1136 后,我清理了我的项目,通知消失了。(产品 -> 清洁)。