Qt and the Mac app store

18th March 2011

If you are using Qt on the Mac, then you are either:

Or maybe you are just using QtCreator, in which case option 1 is being done behind the scenes for you. In any case, the output of the build will be an application bundle. To prepare this for submission to the Mac app store, you need to make sure your application's Info.plist file is valid and conforms to Apple's requirements.

Qmake .pro file

First to there are some changes required to the standard qmake .pro file, as shown below. This achieves the following:

mac {
    # Only Intel binaries are accepted so force this
    CONFIG += x86

    # Minimum OS X version for submission is 10.6.6

    # Copy the custom Info.plist to the app bundle
    plist.path = "$$DESTDIR/$$join(TARGET,,,.app)/Contents"
    plist.files = Info.plist
    INSTALLS += plist

    # Icon is mandatory for submission
    ICON = appicon.icns

Qmake does have a specific option to specify the Info.plist file called QMAKE_INFO_PLIST, but this did not work correctly for me.


The Info.plist itself can be generated by qmake, but in practice its better to maintain your own version, so you have more control over it.
For instance when building Smart Shooter, I use a different file depending on whether I'm building for the Mac app store, or building the version for direct download from my website. This allows Mac app store version to target only Mac OS X 10.6, but the other version to be compatible back to Mac OS X 10.4.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
    <string>Copyright &copy; 2010-2011, Hart Codeworks Ltd.</string>

blog comments powered by Disqus