macOS Code Signing
Parcel signs macOS bundles using Apple Developer certificates. Cross-platform signing is supported on Windows, Linux, and macOS platforms.
Prerequisites
Before signing macOS applications, ensure you have:
- Apple Developer Account: Active Apple Developer Program membership ($99/year)
- Xcode Command Line Tools (macOS only): Available on Apple Developer Resources
Signing Methods
Parcel supports multiple certificate formats depending on development environment and workflow.
KeyChain Identity (macOS Only)
Uses certificates from the macOS Keychain that are installed via a certificate request.
Requires a "Developer ID Application" certificate linked to your team ID for distribution outside the Mac App Store.
P12 Certificate (Cross-Platform)
Portable certificate format containing both the certificate and private key. Apple doesn't provide P12 certificates directly, but they can be exported from the Keychain or generated with OpenSSL.
Parcel uses rcodesign to sign binaries and bundles on Windows and Linux machines.
Create Developer Certificate
- Keychain (macOS Only)
- OpenSSL (Cross-Platform)
Requires a macOS machine for initial setup.
To create a certificate with Keychain:
- Open Keychain Access on macOS
- Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority
- Enter a name in the Common Name field, leave CA Email Address empty
- Choose Saved to disk, then click Continue to generate
certificate.csr - Go to Apple Developer Account > Certificates, Identifiers & Profiles
- Navigate to Certificates > All Certificates
- Click ➕ to create a new certificate
- Choose Developer ID Application for apps distributed outside the App Store
- Upload
certificate.csrwhen prompted - Download the resulting
.cerfile - Import the certificate into Keychain
Export the certificate as P12 to enable cross-platform signing without requiring macOS after this step.
Generate certificates on any platform using OpenSSL.
Prerequisites:
- OpenSSL installed (WSL2 recommended for Windows)
To create a certificate with OpenSSL:
-
Create a private key:
openssl genrsa -out private.key 2048 -
Generate Certificate Signing Request:
openssl req -new -key private.key -out certificate.csr -
Upload the CSR to Apple Developer Portal
- Go to Certificates, Identifiers & Profiles > Certificates
- Click ➕, choose Developer ID Application
- Upload
certificate.csr, then download the.cerfile
-
Convert the certificate to PEM format:
openssl x509 -in development.cer -inform DER -out certificate.pem -outform PEM -
Create a P12 file (you will need the previously created
private.keyfile):openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.pemSet a secure password when prompted.
The resulting certificate.p12 and password can be used with Parcel on any platform.
Troubleshooting
Common Issues
"Developer ID Application" not available when creating a certificate:
This option requires Apple Developer Account team membership. Contact your team's account holder for access.
App signs successfully but cannot execute on other machines:
Verify that you used a "Developer ID Application" certificate. "Apple Development" certificates only work for development builds.
Getting Help
For issues not covered here:
- Review Parcel's signing logs for error information
- Verify certificate status in Apple Developer portal