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:
No icon is defined in Finder
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 ls
ing in terminal.
How can I make Finder show my icon?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With