xcodecontinuous-integrationmac-app-store

Expected File format for altool upload-app for Mac OS App Store app?


I'm packaging my application for the Mac App Store, using the following command

xcrun altool --upload-app --file MyApp.??? --type osx <credentials>

I see on some examples they are using MyApp.zip as the file, and some it is MyApp.pkg.

altool does not seem happy with simply MyApp.app as a zip file, keeps throwing a lot of errors about the Info.plist which are not accurate.

The most success I've had so far is using productbuild to create a pkg, but now it is demanding that I sign it with my "3rd Party Mac Developer Installer" certificate.

Is it required that you create a signed PKG to deploy to the Mac App Store with altool, or are there any alternatives?


Solution

  • The answer seems to be, Yes, a PKG is required.

    It's not well documented, but it would appear that the Mac App Store uses the PKG to install your application upon delivery.

    You must create the following:

    Here's an example of a script that's working for me.

    codesign -vfs "3rd Party Mac Developer Application: MyGreatCompany (XXXXXXXX)" MyApp.app
    
    xcrun productbuild --component MyApp.app /Applications/ myapp.unsigned.pkg
    
    xcrun productsign --sign "3rd Party Mac Developer Installer: MyGreatCompany (XXXXXXXX)" myapp.unsigned.pkg myapp.pkg
    
    xcrun altool --upload-app --file myapp.pkg --type osx