Tuesday, July 12, 2011

Getting your Bundle ID correct for App Store Submission using Corona SDK

My first app submission got bounced back for one simple reason:

3.4: App names in iTunes Connect and as displayed on a device should be similar, so as not to cause confusion

This is a pretty easy thing to screw up so I attempted to document the correct way to align your App name and Bundle ID so you can avoid getting bounced back like I did...

Step 1 - iTunes Connect
As soon as you know the name of your next app, you should go create a new App ID in your iTunes connect account so you can get that name reserved.



In this example I gave it an App ID of "Cool App", choose how you want the App ID Prefix created and finally set the App ID Suffix to "com.domainname.coolapp"

App ID - this is how your App is going to be searched and displayed to users
App ID Prefix -  this gets generated for you based on your provisioning profile being used
App ID Suffix - reverse DNS pattern to further uniquely identify this application

Piece of cake, no go get your application created and ready to upload!

Once you have filled in the remaining information about your application and you are ready to upload it (complete this process in iTunes Connect and your app is "Waiting for Upload" you are ready to continue...


Step 2 - build.settings

Before creating our deployment build, we need to add a couple of entries into the build.settings file, based on the information we put into iTunes Connect above...

These entries assure that the .zip package that gets submitted by Corona will match up with the expectations of the iTunes Connect information.

Now we are ready to build our deployment package, on to the last step...

Step 3 - Corona

This step is a bit tricky to me, and admittedly I don't know if it is 100% correct, however it is working for me and generating expected result in the App Store and the display device so if you have a better way please let me know!



Notice that in this dialogue for "Application name" I entered the reverse DNS Bundle ID from the iTunes Connect data.

My guess is that what happens is that Corona builds the Bundle ID based on the "Application name:" field in this dialogue box.  When I attempted to put in the App ID Description (IE Common name) of "Cool App" you will get a deployment upload error from Corona stating that your package doesn't match anything that iTunes Connect is expecting from you (based on my example here), but I still ran into a scenario where my package name passed the check but I was missing the Display Name entry in the build.settings that we did above.   This ultimately gets you the 3.4 rejection.

That's how it worked for me, so I hope it helps you!   Also, if I have made an error of if you know of another way to configure this data please let me know, but this process successfully got my application through the review and onto the market with the correct names after first getting rejected for this reason...

And just to clarify, in this example the final .zip file that gets uploaded to iTunes Connect would be called com.domainname.coolapp.zip  NOT coolapp.zip

Don't let a poor package name get you rejected and sent back around the review cycle!

Good Luck

--Croisened










4 comments:

  1. hi, thanks this is useful. our appID came out as HKHKF.com.domainname.appname. Do we have to enter the generated identifier as well while building apps with corona sdk or can we ignore them and just stick to com.domain.appname

    ReplyDelete
  2. Sorry I just got back to this, what I found is that Corona must slap that generated prefix on automatically when you select your available apps in the build dialogue boxe during the deployment process so I didn't do anything with it explicitly. Hope that helps!

    ReplyDelete
  3. This is not entirely correct. Your guide is missing one important step.

    You get the warnings from Corona only if you use a wildcard provisioning profile (which you seem to be doing after looking at the screenshot you have in step 3).
    You have to create one App ID for every app you make, and subsequently two provisioning profiles per App ID (developer and distribution).

    Step 1 is correct by creating a unique AppID for your app including the Bundle ID as the App ID suffix.

    Now for the missing step: You must create 2 new provisioning profiles using the new App ID (one development and one distribution).
    Following your example I'd name them "CoolApp Dev" and "CoolApp AppStore".

    Once you do this... Step 2 is unnecessary and can be ignored. No need to modify the build.settings at all.

    In Step 3 when Corona asks for the Application name just type what you want your display name to be. i.e. "Cool App", and make sure the Code Signing Identity is set the your newly created distribution profile (CoolApp AppStore).

    This will create a bundle the has the proper settings in Info.plist located in the app bundle, and should sail through Apple's approval process without any hitches...

    ReplyDelete
  4. @ingemar Thanks for filling in the gap!

    ReplyDelete