简体   繁体   English

为什么要在 info.plist 文件中添加图标?

[英]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按照这些步骤它可以帮助你

  • Select Project target.选择项目目标。
  • Choose app icons and source image > select AppIcon > then click on arrow button选择应用程序图标和源图像 > 选择 AppIcon > 然后单击箭头按钮

在此处输入图像描述

  • An empty app icon set is created, with an image well for each image representation in the set.创建一个空的应用程序图标集,其中每个图像表示都有一个图像井。

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.

相关问题 Xcode:如何将密钥添加到生成的 Info.plist 文件中(或合并生成的和现有的 Info.plist)? - Xcode: How to add key into generated Info.plist file (or merge generated and existing Info.plist)? 选择info.plist文件 - choose info.plist file 将文件添加到 Info.plist WebView React Native 中的 LSApplicationQueriesSchemes - Add file to LSApplicationQueriesSchemes in your Info.plist WebView React Native 必须将自定义字体文件添加到 Xcode 中的 info.plist 吗? - Must one add custom font file to info.plist in Xcode? 如何将 NSAppTransportSecurity 添加到我的 info.plist 文件中? - How can I add NSAppTransportSecurity to my info.plist file? 应用程序因Info.plist文件麦克风中缺少目的字符串而被拒绝,但我无法在info.plist中添加说明 - App got rejected for missing Purpose String in Info.plist File Microphone, but I can't add the description in info.plist 即使图标位于 Xcode 资产文件夹中,info.plist 文件也不会出现 - info.plist file doesn't appear even though the icons are in the Xcode assets folder 是否必须在 info.plist 中添加 NSPhotoLibraryUsageDescription? - Is it mandatory to add NSPhotoLibraryUsageDescription in info.plist? iOS中如何在info.plist中添加属性 - How to add properties in info.plist in iOS Info.plist文件“没有这样的文件”错误 - Info.plist file “no such file” error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM