Open a Terminal window and use the productSign command to sign the package file by substituting the following,.Once you have generated the certificate and installed it in your keychain, follow the steps below to sign the package generated at Step 2 or any pkg file.
If you intend to use this certificate to Sign your in-house applications, please Notarize your software using the Learn how to submit your software for notrization link.
Common Name: Enter a name for the key (for example, John Doe).User Email Address: Enter an email address.Enter the following Certificate Information, This opens the Certificate Assistant dialog box.Go to Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.
Executing the command will ask you the password for your macOS device and once provided the PKG file will be generated in the output folder provided above.Command sudo productbuild -component /Application/APP_NAME.app /OUTPUT_FOLDER/CONVERTED_APP.pkg Example sudo productbuild -component /Applications/ ~/Desktop/Wordpress.pkg Open a Terminal window and execute the following command, where APP_NAME.app is the name of the app (you can use CMD + V if you have copied the path as per Step 1) and the OUTPUT_FOLDER and CONVERTED_APP are the output folder and name for the converted app respectively.Select the app and press CMD + C to copy the path to clipboard Open Applications to get the path to the installed application.