XCode 应用程序图标错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23168165/
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
XCode App Icon error
提问by kusumoto_teruya
I made PNG 58×58 image named [email protected]
and set to app icon.
When build by simulator, the app correctly run.
But when real machine, the app outputs error
with message Failed to write PNG data for the app icon set from "AppIcon appiconse.../test.app/AppIcon29×[email protected]
Why do such error occur?
我将 PNG 58×58 图像命名[email protected]
并设置为应用程序图标。
通过模拟器构建时,应用程序正确运行。
但是真机的时候,app输出错误
信息Failed to write PNG data for the app icon set from "AppIcon appiconse.../test.app/AppIcon29×[email protected]
为什么会出现这样的错误?
回答by Evgeniy Kleban
Try to find answer here - Build app with Xcode 4 - it always show some error about PNG image
尝试在这里找到答案 -使用 Xcode 4 构建应用程序 - 它总是显示一些关于 PNG 图像的错误
There is solution:
有解决办法:
You have to save your PNG files as NOT INTERLACED. Try to open the file in photoshop (or similar), save as, and select "Not interlaced".
您必须将 PNG 文件保存为 NOT INTERLACED。尝试在 photoshop(或类似软件)中打开文件,另存为,然后选择“不隔行扫描”。
回答by Vlad Papko
I guess that you use simulator with retinadisplay, but device with non-retinadisplay.
Icon with size 58×58is used for iPhone Settings/Spotlight, iPad Settings for retinadisplay.
Icon with size 29×29is used for the same aims but for non-retinadisplay.
我猜您使用的是带视网膜显示的模拟器,但使用的是非视网膜显示的设备。
大小为58×58 的图标用于 iPhone 设置/聚光灯,iPad 设置用于视网膜显示。
大小为29×29 的图标用于相同的目的,但用于非视网膜显示。
- Actually you need add icon with size 29×29.
- If this icon exists in your project then check if it is really uses PNGformat.
- 实际上你需要添加大小为29×29 的图标。
- 如果您的项目中存在此图标,请检查它是否真的使用PNG格式。
回答by Flexicoder
The 58 x 58 size is for the Settings icon, not the app icon. Look at the Apple Docsfor details
58 x 58 大小用于设置图标,而不是应用程序图标。查看Apple Docs了解详情
App icon (required for all apps) 120 x 120, 152 x 152, 76 x 76
应用程序图标(所有应用程序都需要)120 x 120、152 x 152、76 x 76
Settings icon (recommended) 58 x 58, 29 x 29
设置图标(推荐)58 x 58、29 x 29