icns文件怎么打开_如何使用iconutil手动创建icns文件?

When I'm validating my app I get this error:

the application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image.

I use to make the icns icons with Img2icns app and till today it always worked good. But now I'm getting that error and there's no way to make it work. I tryed to put two PNG files togheter (512x512 and 1024x1024) in Img2icns but I always get the error. I also tryed to follow instructions on OS X Human Interface Guideline of Apple but when I try to make the icon sets I get this terminal error:

-bash: syntax error near unexpected token 'newline'

I am not very good with terminal command and so maybe I'm doing something wrong. I wrote:

iconutil -c icns

If anyone could help it would be very much appreciated. Thanks, Massy.

解决方案

Checkout the following instructions (link):

Use iconutil to Create an icns File Manually

The iconutil command-line tool converts iconset folders to deployment-ready, high-resolution icns files. (You can find complete documentation for this tool by entering man iconutil in Terminal.) Using this tool also compresses the resulting icns file, so there is no need for you to perform additional compression.

To convert a set of icons to an icns file

Enter this command into the Terminal window:

iconutil -c icns

where is the path to the folder containing the set of icons you want to convert to icns. The output is written to the same location as the iconset file, unless you specify an output file as shown:

iconutil -c icns -o

In other words, you need to replace by the path:

/Users/myname/SDK Mac Apps/MyApp/grafica/icon.iconset

Since the path contains spaces, you need to use double quotes, for example:

iconutil -c icns "/Users/myname/SDK Mac Apps/MyApp/grafica/icon.iconset"

This command should work properly.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值