Xcode 中 Info.plist 文件上的多个图标条目

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

Multiple icon entries on Info.plist file in Xcode

iosiphonexcodeipadicons

提问by DuckDucking

When I import a project that started on Xcode 3 on Xcode 4, it ads another set of entries for the icons on the Info.plistfile. Something like this:

当我在 Xcode 4 上导入在 Xcode 3 上启动的项目时,它会为Info.plist文件上的图标添加另一组条目。像这样的东西:

enter image description here

在此处输入图片说明

and some times there is also another entry called "Icon file"(file on the singular, not plural), alone.

有时还有另一个条目称为"Icon file"(文件单数,而不是复数),单独存在。

Are all these entries required?

是否需要所有这些条目?

Another question: why the launch images Default.pngand [email protected]are added to the icon sections?

另一个问题:为什么启动图像Default.png[email protected]添加到图标部分?

回答by Jonas Schnelli

You only need the entry Icon files(plural) with all your icons (57x57,72x72,114x114,144x144). You may delete the Icon files (iOS 5)as well as the Icon file(singular).

您只需要Icon files包含所有图标 (57x57,72x72,114x114,144x144)的条目(复数)。您可以删除 theIcon files (iOS 5)和 the Icon file(单数)。

The Default.png's in that section is totally wrong and was maybe placed there because of a bug in Xcode.

Default.png部分中的's 是完全错误的,可能是由于 Xcode 中的错误而放置在那里的。

回答by DuckDucking

Like Jonas said, you can delete the (iOS 5) part.

就像乔纳斯所说,你可以删除(iOS 5)部分。

However, this is clearly a new addition, and most likely Apple is going forward with these changes for a reason.

然而,这显然是一个新增功能,而且很可能 Apple 会出于某种原因进行这些更改。

I would clean it up and keep it for forward compatibility.

我会清理它并保留它以实现向前兼容性。

回答by Boris Gafurov

you do not have to specify @2x versions, they will be picked automatically for ipads,dev page herejust list 1x versions in items there.
item 0: Icon - it is 57x57
item 1: Icon-72 - it is 72x72
item 2: Icon-Small - it is 29-29
item 3: Icon-Small-50 -it is 50x50

您不必指定@2x 版本,它们将自动为 ipad 选择,此处的开发页面仅在项目中列出 1x 版本。
项目 0:图标 - 57x57
项目 1:图标-72 - 72x72
项目 2:小图标 - 29-29
项目 3:图标小 - 50 - 50x50

add these files in .png format to your proj as well as @2x so 8 of them all together.

将这些 .png 格式的文件添加到您的 proj 以及@2x 中,因此它们总共有 8 个。

add Default.png and its 2x version to proj too and in launch image specify only Default.png

也将 Default.png 及其 2x 版本添加到 proj 中,并在启动图像中仅指定 Default.png

B