I need to sign a MacOS installer with .pkg extension. I have a .pfx certificate and added it to Keychain. It contains both certificate and the private key.
But when I try to sign this .pkg using productsign utility, it shows an error as :
productsign --sign "commonName" unsigned.pkg signed.pkg
productsign: error: Could not find appropriate signing identity for “commonName”. An installer signing identity (not an application signing identity) is required for signing flat-style products.
You have to find out what the name of your pfx is and replace the "commonName" with it.
U should search for something like "Developer ID Application: ..." to sign the package.