5

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

pkamb
  • 33,281
  • 23
  • 160
  • 191
Bob Ueland
  • 1,804
  • 1
  • 15
  • 24

1 Answers1

5

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.

Grimxn
  • 22,115
  • 10
  • 72
  • 85
Bob Ueland
  • 1,804
  • 1
  • 15
  • 24
  • "you have to change the extension" I'm confused what this means. Do you mean simply touch the extension in the text field in the Xcode editor so it refreshes? Or do you have to actually change it every time you make a new icon? – Maury Markowitz Aug 29 '15 at 16:43
  • 2
    @MauryMarkowitz Attempt to change the file extension of the test file you're trying to preview your icon change on. Even if you choose to reject the extension change in the pop up, it'll make finder refresh the icon for the file. – Alexander Aug 29 '18 at 04:39