Make Apple Developer Certificates and Provisioning Profiles Work on Linux

Lately, I’ve been working on some projects that required me to build and sign macOS applications on my Linux machine.

This is a guide on how to make Apple Developer Certificates and Provisioning Profiles work on Linux.

  1. Create a new directory;
mkdir -p ~/.apple-certificates && cd ~/.apple-certificates
  1. Generate a certificate signing request
openssl req -nodes -newkey rsa:2048 -keyout macos.key -out CertificateSigningRequest.certSigningRequest
  1. With the information like so (make sure to it a password):
Country Name (2 letter code) [AU]:DE
State or Province Name (full name) [Some-State]:Sankt Augustin
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:mistweaverco
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:mistweaverco.com
Email Address []:
  1. Go to the Apple Developer Portal and create a new certificate.

  2. Go through the wizard (either of the Developer ID ones), selecting the certificate type, and uploading the .csr.

  3. Download the .cer file, saving it to the folder created in step 1

  4. Convert the .cer file to a .pem file

openssl x509 -in macos.cer -inform DER -out macos.pem -outform PEM
  1. Convert the .pem to a .p12:
openssl pkcs12 -export -legacy -inkey macos.key -in macos.pem -out macos.p12
  1. You can now create a “Provisioning Profile” in the “Member Center” on developer.apple.com using the certificate you made in step 4