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

2

5

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.

Jilleen answered 11/7, 2012 at 12:43 Comment(0)
B
3

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.

Barbe answered 11/7, 2012 at 14:11 Comment(4)
I am using the some third party library, which I am trying to signing but getting the same error. So how can I resolve this issue.Jilleen
So you have a .pkg file of a 3rd-party library which you wan to sign? The easiest would be to ask the maker of the library to do that... But my knowledge of this topic is very limited.Barbe
can you clarify where this "minimum target" property needs to be set? Is it a property of the application project or the installer project? I'm using Packages to create my installer mpkg, if that matters.Salbu
Hi Mike, sorry for the delay. I added a sentence to explain it :-)Barbe
E
6

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

Elsyelton answered 12/7, 2012 at 17:23 Comment(1)
for what it's worth, I was having the original error when trying to sign a bundle package (mpkg). I switched my project to a flattened package (pkg) and am able to sign without errors now. I suspect this has something to do with the fact that an mpkg is really just a fancy directory and it's probably hard to sign a directory.Salbu
B
3

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.

Barbe answered 11/7, 2012 at 14:11 Comment(4)
I am using the some third party library, which I am trying to signing but getting the same error. So how can I resolve this issue.Jilleen
So you have a .pkg file of a 3rd-party library which you wan to sign? The easiest would be to ask the maker of the library to do that... But my knowledge of this topic is very limited.Barbe
can you clarify where this "minimum target" property needs to be set? Is it a property of the application project or the installer project? I'm using Packages to create my installer mpkg, if that matters.Salbu
Hi Mike, sorry for the delay. I added a sentence to explain it :-)Barbe

© 2022 - 2024 — McMap. All rights reserved.