I do not know if your problem is related to a wider issue as getting generic icons for docs created by your own app.
For me, this problem started with Maverick: changing an existing icon in fileType would sometime result in those docs loosing the icon and getting a generic one: usually only on the desktop, sometimes also in folders; sometimes the Info window for the culprit file would show a generic icon on the top left, yet copying it (the Info generic file) and pasting it into Preview, Preview would show the real icons.
In these cases, the first thing I do is rebooting the mac as Guest, and after creating a doc, if it shows the newly modified icon, then I log-in as owner and follow these steps:
-
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
(password will be asked) -
triple clicking this line: /Library/Caches/com.apple.iconservices.store
and right clicking it, I select Reveal in Finder; and put the revealed folder in the trash. -
I reboot in safe mode (shift-Restart)
-
I restart
If the icons still remain generic, then,
-
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -seed
-
Shift-Restart and Restart.
More than this I don’t know, but I would appreciate if somebody came up with better or easier ways to solve the problem.