Invalid Image Path - No image found at the path referenced under key "CFBundleIconFile": Icon.png

I got the same error when uploading my app. Moving all icon files to the Asset Catalog works if your app supports iOS 5.0 and up.

 

If your app still needs to support lower versions of iOS (like mine), the solution is to use the CFBundleIconFiles key in the project plist file. In my case, my app is an iPhone-only app, so I did the following:

 

1. Prepare 8 icon files: two app icons for iOS6 and earlier (57x57 and 114x114), two icons for iOS7 (60x60 and 120x120), two icons for spotlight search/settings for iOS 6 and earlier (29x29 and 58x58), and two icons for spotlight (40x40 and 80x80). The files must be PNG files. Name these files whatever you want, but the high-resolution file name must in the form of lowResolutionName@2x.png

2. In the project plist file, edit the CFBundleIconFiles key (which is an array) to include the names of the above icon files. Only the low resolution file names are needed, and the extension (.png) should not be included. The Xcode will automatically find the high resolution files as long as their names follow the convention (with @2x).

3. Make sure your project does not contain the Asset Catalog folder

4. If you did the above things right, when you check the "General" section of the app target, you should see that Xcode has listed all the icon files in right place under the "app icons" section.

5. If your app needs to support iOS 3.1 and earlier, you need to make four extra icon files. The size and the name of these files are as follows: Icon.png (57x57), Icon@2x.png (114x114), Icon-Small.png (29x29), Icon-Small@2x.png (58x58). The fixed names are required by iOS and cannot be changed. But as long as you name the icon files that way, you don't need to do any extra things.

 

After these steps, you should not have any problems with the icons when uploading your app to the App Store.

 

The Asset Catalog simplies some of the above steps, e.g, generating low resolution icon files (my guess).

 

I got the above info from "iOS Human Interface Guidelines", "iOS app programming guide" and "information property list reference". Search for "app icons" and everthing is explained.

 

 

 

-------------

注意文件名不要使用非法字符。。。

转载于:https://www.cnblogs.com/GnagWang/p/3356590.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值