[英]Why to add icons in info.plist file?
I have added required icons files in my app.我在我的应用程序中添加了所需的图标文件。 But when I upload app to app store then it shows me an error saying Bundle does not contain icon file 57*57 but in my app I already have it.
但是当我将应用程序上传到应用程序商店时,它会向我显示一个错误,说Bundle 不包含图标文件 57*57但在我的应用程序中我已经有了它。
I developed this app in Xcode 5 then that time I added icons in info.plist because on some of devices icons were not visible.我在 Xcode 5 中开发了这个应用程序,然后我在 info.plist 中添加了图标,因为在某些设备上图标不可见。
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon76</string>
<string>icon40</string>
<string>icon40@2x</string>
<string>icon60@2x</string>
<string>icon40@3x</string>
<string>icon50@2x</string>
<string>icon50</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
So why do we add icons in plist because in my latest project in xcode 7 I did not add icon name in plist still it was uploaded on app store.那么为什么我们要在 plist 中添加图标,因为在我最新的 xcode 7 项目中,我没有在 plist 中添加图标名称,但它仍然上传到了应用商店。
UPDATE更新
<key>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
used above code in plist & tried to run it does not show any icon在 plist 中使用上述代码并尝试运行它不显示任何图标
Use Image Assets and fill up all icons with respective size and resolutions.使用图像资源并用各自的大小和分辨率填充所有图标。 In turn it automatically gets added to the pList, as Xcode does this part itself, just like when you add URL schemes in project settings, all those URL gets added in plist by XCode itself.
反过来,它会自动添加到 pList 中,就像 Xcode 自己做这部分一样,就像在项目设置中添加 URL 方案时一样,所有这些 URL 都由 XCode 本身添加到 plist 中。 While uploading to Appstore, they check the plist info.
在上传到 Appstore 时,他们会检查 plist 信息。
follow these steps it helps you按照这些步骤它可以帮助你
Drag an app icon from the Finder to the appropriate image well in the set viewer.将应用程序图标从 Finder 拖到集合查看器中的适当图像池中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.