How to set a File Icon on a Mac?


#1

Hello all

I'm porting an applicaiton on MACOSX and we're saving "session files", i know how to associate a file extension with an icon on Windows (via NSIS installer + using registerFileAssociation from JUCE) but i can't find how to do the same on MACOSX 

Can you help ?

Thanks in advance 

 


#2

It's stored in your applications .plist

You can edit from from target settings >> info >> document types

It looks like this:

I've never figured out how to do it programmatically.


#3

Thanks a lot. 

It seems to create a section in my .plist called CFBundledDocumentTypes

 


#4

The introjucer has a setting for this, where you give it the list of document extensions, and it'll sort out the plist entry automatically


#5

Thanks Jules

Iit's only available on mac target - this is why i haven't seen it before


#6

OK i've checked and Yes the files i create with the tool do open with the tool (the extension is recognised well). 

But the problem is that these files still don"t show with the proper icon. 


#7

Sorry. The icons have refreshed after OS restart.