Debugging iPhone App Submissions

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.

  1. Export your Distribution P12. Make sure it has a private key and a public cert. Use openssl to verify (instructions below)
  2. Download your Distribution mobileprovision. Open it up and sure that it has the right App ID (search for the string <key>ApplicationIdentifierPrefix</key>)
  3. If you’re using Flash Pro CS5, ensure you’re on Beta 4 or higher.
  4. Publish your app for App Store
  5. Rename the IPA to ZIP and unzip. Keep the ZIP.
  6. 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”).
  7. 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.
  8. Verify the inside of your all looks roughly like this the image below.
  9. 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
Bag Attributes
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
-----BEGIN CERTIFICATE-----
<SNIP>
-----END CERTIFICATE-----
Bag Attributes
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-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,B2347A9F38B7303D
<SNIP>
-----END RSA PRIVATE KEY-----

Leave a Reply

Your email address will not be published. Required fields are marked *