Missing custom data file icon

My desktop application uses a custom icon for its data files. Recently, in order to make the application more correct for OS X (10.7+), I added a UTI to the filetype so double-clicking on the file in the Finder would launch my application and open the file. Now my custom icon no longer appears on files in the Finder, replaced by a generic file icon. I am using Xojo 2014r2.1 and the icons are properly displayed in my filetypes1 declarations in the IDE. I also checked the info.plist file and it also appears to have the icons properly identified.

Prior to declaring the UTI in filetypes1, the custom data file icons did appear. Any ideas what caused the icons to disappear and more importantly, how to get them back?

Have any of your customers reported the issue? It may be local to you, this happens sometimes when the LaunchServices agent gets confuzzled.


Have you added the UTI information as well?
This cannot actually be done in Xojo, you can either use Xcode or use a tool like App Wrapper (sorry, it’s my own tool) to add the UTI information.

I have reset LaunchServices, to no avail. As for the UTI information, I am a bit confused here as to what I should do in Xcode? My reading of the UTI information is that the Info.plist file within the application package should contain some declarations for the icns file and the filetype. When I open the Xojo compiled package, the Info.plist file does contain XML code for both the icns file and the filetype, but I do not know what precisely it should be. I also tried opening the plist file in Xcode and to my untrained eye everything appeared to be present.

The problem is definitely with the plist declarations since once the UTI data was entered in Xojo the custom document icons soon changed to generic icons in the Finder.

Where can I find some information that describes precisely what should be there, why the Xojo produced plist is not sufficient and how it can be fixed?

That’s actually on one of the pages in the manual. I can’t recall which off the top of my head, but I think it’s in the Mac OS X specific section. If you have AppWrapper it takes care of UTIs for you.

Why is it not sufficient and how can it be fixed?
That answer get nasty quick depending on who you ask.

For a quick example, take a look at the info.plist from the Xojo application, especially the “UTExportedTypeDeclarations” array.

[promo]You could also use the free trial of App Wrapper to confirm that it’s the UTIs. http://www.ohanaware.com/appwrapper/[/promo]

Thank you everyone for the information! With your clues I was able to fix the problem and my icons are back on the data files where they belong.

In summary, the problem is that Xojo produces an incomplete Info.plist file in the application bundle which contains the bundle descriptions but not the UTI descriptions. This results in the data file icons being replaced with generic file icons.

I am struggling with this exact same problem. Can you tell me any more about how you eventually resolved it? I have tried following the direction on pages 40-41 of the “Development” User Guide, but I’m still not getting document icons. Did you have to make additional changes to your Info.plist besides what those instructions say to do?


Please: version # ?

When I has the same problem, I changed the extension of my private file. For instance, if it was .ccp, I changed it into .ppc; launched the app, and the document got its icon. Then I changed back the extension to its original .ccp; and the icon was still all right.

@Emile Schwarz
Already mentioned in the topic start. :wink:

Sorry: my turn (too often) to read only parts of the text.

I use 2015r1 and saw my custom icons only on Open / Dave Dialogs.

I booted on a Mavericks external HD to rebuild the Spotlight index of teh internal SSD * (that works fine there), and some things comes back (works better), but not that.

I have to go to a three old years project with custom icons that are displayed correctly and search why. ;-:slight_smile:

External Hard Disks Spotlight index are rebuild easily when I boot on Yosemite (internal SSD), but the internal SSD does not seems to be rebuild (or is it too fast to be noticed ?)