I have a problem with the displayed application name for my app on Mac OSX, after installation, not being as I want. This is for an app distributed as a pkg file outside of the app store. Everything works fine except for the displayed name of the application as shown in the Mac's 'Applications' folder. What is displayed is always the bundle name (without the .app) whatever I do. I had thought it would use the name I give within the Info.plist
file.
This is what I am doing.
I create a bundle for my app, that contains an Info.plist that defines the bundle display name, like so:
myapp.app/
myapp.app/Contents
myapp.app/Contents/Info.plist
myapp.app/Contents/MacOS
...
myapp.app/Contents/Resources
...
Its actually a Qt based app that I build using qmake/make/macdeployqt and not using Xcode. But that should be irrelevant to my problem, I think. In my Info.plist
file I have:
<?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>CFBundleIdentifier</key>
<string>uk.co.blahdomain.MyApplication</string>
<key>CFBundleName</key>
<string>My Application</string>
<key>CFBundleDisplayName</key>
<string>My Application</string>
.....
</dict>
</plist>
I build an installer package for the app as follows:
pkgbuild --component myapp.app --version 1 --install-location /Applications component.pkg
productbuild --distribution distribution.xml --resources ./distresources --package-path . --version 1.2.3 --sign "Developer ID Installer: blah company name" test.pkg
As you can see my build processes created a myapp.app
bundle folder and from that I created a .pkg
using pkgbuild
and productbuild
. But embedded within the component package thats in the final product package is its Info.plist
file that says what (I want) the displayed name to be - "My Application"
.
I can run the .pkg file from the Finder and it all seems to install OK.
But when I open my Applications folder (using the 'A' icon in the task bar thing) its there but NOT called 'My Application'
but instead called 'myapp'
which was the name of the application bundle. Its runs fine, just the displayed name that is always wrong.
So... the PROBLEM is that I want to control the name the user sees but as it contains spaces I cant use that as the name in the bundle.app.
So... how do I get the application name to show as I want within the /Applications folder and on the task bar icon?
Thanks