« Back

Publishing your Apps: How to create a p12 file

Publishing your iPhone app on the Apple AppStore is the final stage in your app making process, and allows people to download it to their own phones. But unfortunately, the process of publishing through Apple can be a bit tricky if you’ve never done it before, so, here’s a walkthrough of the process to create a p12 file – one of the crucial AppStore publishing files.

Please note: these instructions are written for Mac users, as the Apple publishing process requires you to have access to a Mac computer. If you’re publishing an app through AppFurnace, but don’t have access to a Mac computer, contact us through support@appfurnace.com and we’ll see if we can help you.

Creating the .p12 file

The .p12 file includes the certificates that Apple software needs to build apps, which can be uploaded to your Apple Developer account. Once you’ve created this file, you can use it to create an executable version of your app for use on your phone – but more crucially, you’ll need it to publish your app on the Apple AppStore.

  1. Open the Keychain Access program on your computer (found in Applications/Utilities)
  2. Open Keychain Access > Preferences, and open the Certificates tab
  3. For “Online Certificate Status Protocol” and “Certificate Revocation List”, select “Off”
    Keychain: Preferences Window
  4. Open Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority
    Note: In the main Keychain Access window, make sure that you don’t have a private key selected, otherwise this process will not work correctly.
  5. Enter the email address and name that  you used to register in the iOS Developer Program for the email address and common name fields.
    You don’t need to enter a CA Email Address

    p12: Certificate Username
  6. Select “Saved to Disk”
  7. Select “Let me specify key pair information”
  8. Click Continue
  9. Enter a filename and choose a destination (e.g. “certificate.certSigningRequest”)
  10. Click Save
  11. For “Key Size” choose “2048 bits”
  12. For “Algorithm” choose “RSA”
  13. Click Continue and the certificate request file will be saved to the destination you chose in step 9
  14. This will create a private key in Keychain Access with the Common Name you entered earlier. This will appear in Keychain Access as a key icon with your name written next to it (e.g. John Smith)

    Keychain: Select One
  15. Log on to https://developer.apple.com/ using the Team Agent account (the main user account for your iOS developer profile)
  16. Navigate to the “iOS Provisioning Portal” if you’re not already there

    Developer Center: iOS
  17. Click “Certificates” from the left-hand panel
  18. Click the “Distribution” tab
  19. Click “Request Certificate”
  20. Click “Choose File” & choose the certificate request file you’ve just made from the list
  21. Click Submit
  22. Click the ‘Accept Certificate Signing Request’ button
  23. Your distribution certificate should now be listed under Current Distribution Certificate. If it doesn’t appear automatically, you may need to refresh the page.

    Certificates: Distribution
  1. Click the “Download” button, and you’ll get a distribution.cer file. Once it’s downloaded, click it and it will open in the Keychain Access program we used earlier.
    NOTE: You don’t need to upload this file to AppFurnace.
  1. If you see a popup saying ‘Do you want to add the certificate to a keychain?’ choose ‘login’ and hit Add

    Add Certificate to Keychain Dialog

Now we need to export both the certificate file you just created, and the private key that we created earlier, to a single .p12 file that we’ll then upload to AppFurnace.

  1. Back in the Keychain Access program, select the login keychain from the top-left panel
  2. Select “Keys” from the “Category” menu in the left panel
  3. Find the private key associated with your iPhone Distribution Certificate. This private key is called <First Name> <Last Name> (e.g. John Smith)
  4. Expand this item, and inside you should see the Certificate (iPhone Distribution: <First Name> <Last Name> )
  5. Select BOTH the key and the certificate (Hold CMD and click both items)
    Keychain: Select 2 Items
  6. Right click and select Export 2 Items…
  7. Save your key in the Personal Information Exchange (.p12) file format, and call the file “Certificates.p12”
  8. You will be prompted to create a password that is used when you attempt to import this key on another computer
  9. Set the password to blank in both cases

This is the final p12 file you’ll need, so keep it in a safe place.


Next time, we’ll be covering how to create mobile provisioning files in the Developer interface.

Be Sociable, Share!

Author: Kieron Gurner

Kieron is a web designer & developer for Calvium, with a hand in interface and experience design from time-to-time.


  1. Thayer DeMay

    Thank you, i was going bonkers trying to get my app to the app store (uploader wasn’t accepting my keys), your instructions really helped after 1 week of searching and failing! Didn’t know you had to highlight BOTH key and certificate to get a proper p12.

    Why the heck does Apple make this process so impossible for us developers?


  2. Kieron Gurner

    Hi Thayer,
    We have no idea why the process is so difficult, but we’re glad this walkthrough helped. Good luck with your app!


Leave a Comment