NSDocument custom icon not displaying in Finder but displaying in Quick Look
Asked Answered
R

2

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?

Ramage answered 4/7, 2015 at 13:18 Comment(5)
Hi, did solve the problem? Having a similar issue here.Immixture
@Immixture unfortunately not, I couldn't solve it. would be glad if you find the answer and post it.Kissee
I noticed that on a new user account, everything works as expected. Now after the last restart of my Mac it also works on my user account. Surprisingly, I did rebuild launch services database before, but it didn't work. Not sure what the restart did in the end.Immixture
Well I've restarted a dozen of times, but no avail :( @ImmixtureKissee
Try it on a new user account. Does it work there?Immixture
M
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.

Michelemichelina answered 9/6, 2016 at 5:3 Comment(0)
W
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 !
Wake answered 20/1, 2017 at 20:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.