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

1

5

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?

Crimea answered 5/2, 2020 at 23:4 Comment(0)
C
8

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:

  • PKG for delivery
  • signing certificate for the Mac App
  • signing certificate for the Mac Installer.

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
Crimea answered 14/2, 2020 at 19:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.