I recently started to use the D programming language and I download a d.pblangspec and d.pbfilespec to give me syntax highlighting and stuff, but the icon for .d files is the plain white document icon. I have an icon named dfile.icns that I want to use and I put it in the Xcode.app/Contents/Resources/ and then I edited the Info.plist in Xcode by adding a dictionary under the CFBundleDocumentTypes array and put the following to the dictionary I created:
An array called CFBundleTypeExtensions with a string with the value "d".
A string called CFBundleTypeIconFile, with the value "dfile.icns"
An array called CFBundleTypeMIMETypes with a string with the value "text/plain"
A string called CFBundleTypeName with the value "D Source File"
An array CFBundleTypeOSTypes with a string with the value "TEXT"
A string CFBundleTypeRole with the value "Editor"
A boolean LSIsAppleDefaultForType with the value Yes
A boolean LSTypeisPackage with the value No
A string NSDocumentClass with the value "PBXSourceFileDocument"
When I create a .d file the icon is still the the plain default document icon, but if I go to Get Info->Open With->Other and choose Xcode (even though it already is on Xcode) the icon changes to the one I want, but if I choose Change All it goes back to the normal default white document icon.
Does anyone know how to get this to work?