In December, I posted about how to debug iPhone code signing issues. We’ve had a ton of developers building apps and the submission process to Apple’s iTunes Connect is far from straightforward. Here are some tips on how to debug your iPhone app submission. Most of these are specific to the pre-release of Flash Pro CS5, but all the certs stuff should apply all the same.
- Export your Distribution P12. Make sure it has a private key and a public cert. Use openssl to verify (instructions below)
- Download your Distribution mobileprovision. Open it up and sure that it has the right App ID (search for the string <key>ApplicationIdentifierPrefix</key>)
- If you’re using Flash Pro CS5, ensure you’re on Beta 4 or higher.
- Publish your app for App Store
- Rename the IPA to ZIP and unzip. Keep the ZIP.
- Dump your codesign for the .APP that’s inside the unziped folder and make sure it matches your Distribution P12 (must have the line in the dump which says “Authority=iPhone Distribution”).
- Inside the unzipped folder, look for an embedded.mobileprovision. Make sure it’s the same exact file as the distro mobile provision you downloaded in step 2, just renamed.
- Verify the inside of your all looks roughly like this the image below.
- Upload your ZIP to iTunes Connect.
Here’s an example of what the inside of the .APP file should look like. Key things in here are for YourAppHere to include an embedded.mobileprovision, Default.png, Icon.png, Icon-Small.png and of course your app’s binary (YourAppHere). The rest should be automatically generated when your app is packaged. It’s also probably a good idea to keep your file name to letters and numbers.
Lastly, for debugging your p12, use:
abansodmbp:~ abansod$ openssl pkcs12 -in ~/Desktop/asdf.p12
Enter Import Password:
MAC verified OK
friendlyName: iPhone Distribution: Aditya Bansod (8HHA9BB65G)
localKeyID: E8 3C CF A0 3B 7F 77 C1 E8 89 96 2F B7 8F 0D E4 FD D3 B9 19
subject=/UID=PSLAU6FDD9/CN=iPhone: Aditya Bansod (8HHA9BB65G)/C=US
issuer=/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
friendlyName: Aditya Bansod
localKeyID: E8 3C CF A0 3B 7F 77 C1 E8 89 96 2F B7 8F 0D E4 FD C3 B9 19
Key Attributes: <No Attributes>
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----