Unsolved Questions about Mac Deployment
-
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
-
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 -
@mpergand Well, in fact I was looking for documentation and the PNG format is supported as you can see here:
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.
-
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.htmlI 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.