How do I create icon for my documents in OS X

2019-06-22 05:03发布

I have a document-based application. So I need an icon for my app as well as an icon for my documents.

In Xcode/Images.xcassets there is an item called AppIcon which I can use for setting the icon of the app.

enter image description here

But how do I make an icon for my documents?

Here is what I have tried under TARGETS/Document Types and TARGETS/Exported UTIs

enter image description here

I have tried different methods suggested on Internet but nothing works. The doc icon is always blank and empty as you can see below:

enter image description here

1条回答
地球回转人心会变
2楼-- · 2019-06-22 06:04

It turns out that if you change your icon you have to change the extension as well in order for the icon to show up.

So what I did was to first test without any icon getting an empty icon, and then tried to add the real icon. That did not work. Instead as soon as you add a new icon, also make sure to change the extension.

It is funny how such a little thing can make you lose a whole day, and also that I didn't find even a hint on this on the net.

查看更多
登录 后发表回答