1

My problem is very similar to this entry: Mac OS X file association works, but file icon not changed.

I'm developing an app with Qt 5.3 that handles files of a specific extension (say .xyz). I only have OS X Yosemite for testing and I managed to get the file association working (application opens when double-clicking a file), but the icon (say xyz.icns which is present in the application.app Resource folder) hasn't changed (still the default white sheet of paper, visible from the desktop and from Finder). Here is the info.plist content related to the file association:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleTypeIconFile</key>
        <string>xyz.icns</string>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>xyz</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>My App Extension</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
    </dict>
</array>

I refreshed the Launch Service that seemed to solve the problem for those who where in my situation, and I effectively see only one entry of my application in the lsregister dump:

Container mount state: mounted
bundle  id:            23036
    path:          /Applications/My App.app
    name:          My App
    identifier:    com.mycompany.my-app (0x8001bf71)
    sys version:   10.6
    mach sys ver:  10.7
    execSDK ver:   10.10
    flags:         has-display-name  relative-icon-path  
    item flags:    container  package  application  extension-hidden  native-app  x86_64  
    icons:         Contents/Resources/myapp.icns
    executable:    Contents/MacOS/My App.app
    ...
    --------------------------------------------------------
    claim   id:            34548
        name:          My App Extension
        rank:          Owner
        reqCaps:      
        roles:         Editor  
        flags:         relative-icon-path  doc-type  
        icon:          Contents/Resources/xyz.icns
        bindings:      .xyz

I also rebooted but no new result. I wonder what I am missing... Any clues ? Thanks !

Community
  • 1
  • 1

0 Answers0