How to set a File Icon on a Mac?

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 

 

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.

Thanks a lot. 

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

 

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

Thanks Jules

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

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. 

Sorry. The icons have refreshed after OS restart.