8

I'm designing a custom application and I've set a custom icon for my file type.

I've put the icon on both Document Types and Exported UTIs section (filling in other values too, obviously).

Here is what I get when I run:

enter image description here

No icon is defined in Finder

enter image description here

But in Quick Look, it displays correctly.

I've seen CFBundleTypeIconFile Icon not showing for given file extension and tried rebuilding the launch services database. I've restarted Finder, cleaned Xcode project/derived data etc. and re-run, but nothing changed. Finder still doesn't display my icon. My ICNS file has all the required sizes contained. Everything works fine otherwise (when I double click it opens correctly with my app etc). By the way, my file DOES have the extension, it just doesn't display in Finder. I can verify that it has the correct extension by lsing in terminal.

How can I make Finder show my icon?

Community
  • 1
  • 1
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389

2 Answers2

2

I found this solution, which worked for me. I did not have to restart my Mac, just the Finder (I have a little AppleScriptlet to tell it to quit).

Execute the following commands:

sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;
sudo rm -rf /Library/Caches/com.apple.iconservices.store
killall Finder

Then relaunch the Finder or log out and back in, or restart your Mac.

Alexander
  • 59,041
  • 12
  • 98
  • 151
Rick
  • 3,298
  • 3
  • 29
  • 47
1

I have found a very simple solution :

  1. right click on a file icon and select "show presentation options" select
  2. then deselect the checkbox at the bottom (Use content outline as icon) NB: I have a french speaking system, so I'm not sure how it is in US Finder
  3. icons appear magically !
claude31
  • 874
  • 6
  • 8