Pergunta

I have one Mac Desktop Cocoa based application which i have signed succesfully by mac Certificates.

To generate .pkg installer file i am using the following command:

productbuild --component 'App.app' /Applications --sign '3rd Party Mac Developer Installer: Some Name' App.pkg

which generates .pkg file succesfully with proper signing. No complaints about it.

But now i want to include some precheck installation scripts in that .pkg which can perform some validations on user's system prioir to installation. How to do it once i have my pkg generated already? I can easily include such scripts in the package through Package Maker but then how to sign .pkg  file with Installer Certificate. As this process does not signs my pkg file and hence unacceptable to upload to AppStore

Foi útil?

Solução

First, I'm not sure you're allowed to include such scripts in an App Store package in the first place.

But if you are, the manpage for productbuild explains how to generate a package from a custom Distribution file by using the --distribution option instead of --component. And, if you don't know how to write a Distribution file, you can look at the ones inside any package (just "xar xf App.pkg" to extract the contents, and Distribution will be at the top level) and/or use productbuild with the --synthesize option.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top