Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Questions about Mac Deployment
Forum Updated to NodeBB v4.3 + New Features

Questions about Mac Deployment

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 964 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xtingray
    wrote on last edited by xtingray
    #1

    Hi,
    I am trying to enhance the user experience of my Qt application in Mac, but I am having some issues with the Info.plist file.
    I have my own format extension called .tup and I want to associate it to my app, including an icon for this format when you browse the files using Finder.
    My goal is that if you double click any of the .tup files, it should be opened by my application. But it's not working.

    This is the current content of my Info.plist file:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
            <key>CFBundleName</key>
            <string>TupiTube Desk</string>
            <key>CFBundleDisplayName</key>
            <string>TupiTube Desk</string>
            <key>CFBundleExecutable</key>
            <string>TupiTube</string>
            <key>CFBundleVersion</key>
            <string>0.2.10</string>
            <key>CFBundleDocumentTypes</key>
            <array>
              <dict>
                <key>CFBundleTypeExtensions</key>
                <array>
                  <string>TUP</string>
                </array>
                <key>CFBundleTypeRole</key>
                <string>Editor</string>
                <key>CFBundleTypeName</key>
                <string>TUP Animation</string>
                <key>CFBundleTypeIconFile</key>
                <string>tup.png</string>
                <key>LSItemContentTypes</key>
                <array>
                  <string>TUP</string>
                </array>
                <key>LSHandlerRank</key>
                <string>Owner</string>
              </dict>
            </array>
            <key>CFBundleIconFile</key>
            <string>tupitube.desk.icns</string>
            <key>CFBundlePackageType</key>
            <string>APPL</string>
            <key>CFBundleGetInfoString</key>
            <string>Created by MaeFloresta</string>
            <key>CFBundleIdentifier</key>
            <string>com.maefloresta.tupitube</string>
    </dict>
    </plist>
    

    I can build the .dmg file, I can install my application, but the .tup files doesn't show my icon extension and I can not open them from the Finder if I double click them.

    Any suggestion? Thanks.

    Note: the tup.png icon is located at MyApp.app/Contents/Resources/tup.png


    Qt Developer

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #2

      Hi,

      The image must to be in icns format.

      You'll find a lot of tutorials about that on the web, like this one:
      https://www.lifewire.com/icns-file-2621787

      X 1 Reply Last reply
      1
      • M mpergand

        Hi,

        The image must to be in icns format.

        You'll find a lot of tutorials about that on the web, like this one:
        https://www.lifewire.com/icns-file-2621787

        X Offline
        X Offline
        xtingray
        wrote on last edited by
        #3

        @mpergand Well, in fact I was looking for documentation and the PNG format is supported as you can see here:

        https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html

        Nevertheless, I am using an icns file for the application icon and currently it works (you can see its reference in the Info.plist file). I tried to use the same file for the extension .tup but it didn't work neither.


        Qt Developer

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mpergand
          wrote on last edited by mpergand
          #4

          Not sure, but it seems that CFBundleTypeIconFiles (with an s) is for IOS.

          CFBundleTypeIconFiles
          An array of strings containing the names of the image files to use for the document icon in iOS. For more information about specifying document icons, see Document Icons.

          see Recommended Keys for Cocoa Apps here: (core foundation)
          https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

          I experienced such issues too. The trouble is that usely they are multi instances of the same app (debug/release) and the finder can be confused with.
          Try to delete the multiple copies of your app and restart the computer.

          Hope it helps.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved