Fork us on GitHub

iOS Code Signing Fail Checklist

This is one of the biggest FAQ's we get on the mailing list: ...
iOS Code Signing Fail Checklist

iOS Code Signing Fail Checklist

Export P12
This is one of the biggest FAQ's we get on the mailing list: I followed the iOS signing tutorial or video tutorial and still didn't succeed in signing (notice that you need to actually read the links above, the certificate you get from the apple website is not enough!).

How do I debug something like this?

Notice that some of these signing failures will sometimes manifest themselves during build and sometimes will manifest during the install of the application.

Well, there are several steps we always need to follow when troubleshooting such issues:
  1. You must use a Mac to generate the P12 certificates. There is no way around it! (tutorials that show otherwise will not work).
    We would like to automate it in the future (in a similar way to our Android signing tool), but for now you can use MacInCloud which has a free version.
    Notice that this is something you need to do once a year (generate P12), you will also need a Mac to upload your final app to the store though.

  2. When exporting the P12 certificate make sure that you selected BOTH the public and the private keys as illustrated in the image to the right.

  3. Make sure the package matches between the main preferences screen in the IDE and the iOS settings screen (see pictures below).

  4. Make sure the prefix for the app id in the iOS section of the preferences matches the one you have from Apple (see pictures below) .

  5. Make sure your provisioning profile's app id matches your package name or is a * provisioning profile. Both are sampled in the pictures below, notice that you would need an actual package name for push/in-app-purchase support as well as for app store distribution.

  6. Make sure the certificate and provisioning profile are from the same source (if you work with multiple accounts), notice that provisioning profiles and certificates expire so you will need to regenerate provisioning when your certificate expires or is revoked.

  7. If you declare push in the provisioning profile then ios.includePush (in the build arguments) MUST be set to true, otherwise it MUST be set to false (see pictures below) .

Did this help you? Let us know in the comments.

Notice: This post was automatically converted using a script from an older blogging system. Some elements might not have come out as intended.... If that is the case please let us know via the comments section below.

Share this Post:

Posted by Shai Almog

Shai is the co-founder of Codename One. He's been a professional programmer for over 25 years. During that time he has worked with dozens of companies including Sun Microsystems.
For more follow Shai on Twitter & github.