简体   繁体   中英

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.

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.

<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.

UPDATE

 <key>CFBundleIcons</key>
    <dict/>
    <key>CFBundleIcons~ipad</key>
    <dict/>

used above code in plist & tried to run it does not show any icon

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. While uploading to Appstore, they check the plist info.

follow these steps it helps you

  • Select Project target.
  • Choose app icons and source image > select AppIcon > then click on arrow button

在此处输入图像描述

  • 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM