Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to sign a Mac installer for distribution outside the Mac app store

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.

like image 921
vikas Avatar asked Feb 20 '23 21:02

vikas


2 Answers

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

like image 104
fooguy Avatar answered Apr 09 '23 03:04

fooguy


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.

like image 23
clemens Avatar answered Apr 09 '23 05:04

clemens