New file icon not used in the Finder

I have created two new .icns, one for my app and the other for a file it creates. I move the .icns for the application into the app bundle and it’s picked up immediately in the Finder. But if I do the same with the new .icns with the file’s icon it stays the same – it’s the old icon. I’ve tried changing the icon in File Types in the IDE as well, with or without replacing the .icns after a build, but it never takes. Using Get Info in the Finder I see the old image in the preview pane, and resetting the “ownership” to the new build in the Application Folder does nothing. I’ve googled for this and haven’t found a solution. Is there a trick to forcing the Finder to use the new icns?

Sometimes there is
It may require flushing the cached launch service database or rebuilding it
Google for “rebuild launch services database”

Johnathan: did you assign the document icon to the File Type you created in your project ?

Please see this thread: https://forum.xojo.com/19142-missing-custom-data-file-icon/

Thanks to all that replied. Sam, I don’t think it’s a UTI issue – it’s not that the icons are blank, it’s that the old icons are kept (I don’t have any UTIs, btw, I never really understood them).

I followed Norman’s suggestion, and that worked. The terminal command that fixed it is

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

this is the modern equivalent of rebuilding the desktop database :slight_smile: