4
votes

I am facing a problem in signing a installer for mac application which I am planning to distribute outside the mac app store. I am using the developer installer certificate to sign the app but it is giving some error. below is command I am using to sign the app.

productsign --sign "Developer ID Installer: XYZ" "/path/to/input" "/path/to/output" 

productsign: signing product with identity "Developer ID Installer: XYZ" from keychain "login keychain Path"

productsign: adding intermediate certificate "Developer ID Certification Authority"

productsign: adding intermediate certificate "Apple Root CA"

productsign: error: Can't add contents of input archive to output.

Does anyone have the solution or any idea about this problem.

  1. If I try to create the installer through xcode then it will work fine. But since my application installer contains multiple .pkg file inside it ,we are creating the installer file through pakagemaker. My next query is:

  2. Is it possible to successfully sign a installer created with pakagemaker.

  3. Is it possible to sign a .mpkg file.

Thanks in advance.

2

2 Answers

2
votes

This goes away when you set the minimum target in the "install properties" to 10.5 (leopard)!

(When you open the installer with packagemaker, select "Project" > "Install Propertiers" to find that setting.)

So it seems to be some sort of compatibility issue.

6
votes

If your .pkg is a bundle (a folder with stuff in it) -- flatten it first before signing:

pkgutil --flatten orig.pkg flat.pkg

productsign --sign 'Developer ID Application: Foo Guy' plat.pkg flat_signed.pkg