views:

22

answers:

0

I'm trying to get my application to display an icon for a custom file extension using the following code:

<key>CFBundleDocumentTypes</key>
   <array>
       <dict>
           <key>CFBundleTypeName</key>
           <string>My Custom Extension</string>
           <key>CFBundleTypeRole</key>
           <string>Viewer</string>
           <key>LSItemContentTypes</key>
           <array>
                   <string>com.myapp.myext</string>
           </array>
           <key>LSHandlerRank</key>
           <string>Owner</string>
           <key>NSExportableTypes</key>
           <array>
                   <string>com.myapp.myext</string>
           </array>
       </dict>
    </array>
   <key>UTExportedTypeDeclarations</key>
   <array>
           <dict>
                   <key>UTTypeIconFile</key>
                   <string>Myicon.icns</string>
                   <key>UTTypeDescription</key>
                   <string>My Custom Extension</string>
                   <key>UTTypeConformsTo</key>
                   <array>
                           <string>public.data</string>
                   </array>
                   <key>UTTypeIdentifier</key>
                   <string>com.myapp.myext</string>
                   <key>UTTypeReferenceURL</key>
                   <string>http://www.myapp.com&lt;/string&gt;
                   <key>UTTypeTagSpecification</key>
                   <dict>
                           <key>public.filename-extension</key>
                           <array>
                                   <string>myext</string>
                           </array>
                   </dict>
           </dict>
   </array>

I've tried using both UTTypeIconFile AND CFBundleTypeIconFile, and the icon is present under my Content/Resources folder inside the app bundle, but I still see a blank icon when looking at files that have my file extension

I'm not sure if it matters, but this application is launched using the JavaApplicationStub (it's a java app)

Any help would be appreciated :)