Build for App Store - How To Guide

OK, thought i might save someone out there a few hours running around in circles. (Like I did).

There seems to be no step-by-step guide for actually getting an app into the app store.... FOR THE FIRST TIME.

IMPORTANT: Let me repeat "FOR THE FIRST TIME" again. Once you get the hang of things, you'll probably not have to renew certificates and provisioning stuff. These

So here's my attempt to remember the steps while developing my app "Key Chords".

--------------------------------------------
Quick Hints
--------------------------------------------

- No spaces in your development folder names. (Including parent folders all the way down to the root of the hard drive.) Really.

- "Application Loader" is located here:
Mac HD > Developer > Applications > Utilities > "Application Loader"
You have to "zip" your app. Right click (or apple click) on the app, and choose "Compress [your app name]"

- Voodoo: You may have to be signed in to the provisioning portal (via safari) when using Application Loader.

- Before the running the Application Loader, your app must be in "Ready to Upload" status in itunes connect.

--------------------------------------------
1. Clean up your certificates / keys / provisioning profiles.
--------------------------------------------

Open Key Chain and find your old "dist" and "dev" certificates and remove them (We're making new ones.) The certs in Key Chain are named "iPhone Distribution: Your Name" and iPhone Developer: Your Name"

Key Chain > (Side Bar: Category) > Certificates (or "my certificates")

You can also click in "Keys"
Key Chain > (Side Bar: Category) > Keys
...and remove the keys that just say Your Name. I think these get created

I ended up doing this, like, 8 times. So I got pretty good at it. You will too.

--------------------------------------------
2. Reboot
--------------------------------------------
It's a voodoo thing. Rebooting is fun too!

--------------------------------------------
3. Create new certificates.
--------------------------------------------

Yes, go ahead and revoke the old ones, then follow the steps to get new ones. You'll need one for "development" and one for "distribution". Be sure to have your exact name and email used for your iOS account.

iOS Prov Portal > (Side Bar: Certificates) Create new or revoke
wait a few minutes then refresh and follow the instructions.

NOTES:
-- Pay close attention to the name and email address you use when setting up your certificates. (Use the ones you used when setting up your developer account.)
-- When creating the certificate authority request files, use the same names and emails as above.

This process will bring you back into Key Chain.

I had to do this a zillion times too, so you'll get good at it too.

NOTE: This guide is intended for "first time" people -- so that everything is set up nice and clean. Once you get the hang of things, you probably won't have to renew/revoke certificates.

--------------------------------------------
4. Set up your App IDs
--------------------------------------------

Use something like looking like com.boob.myappname

(Like a regular web address, assbackwards. You don't need an actual domain name, just make one up.)

NOTE: Don't put any of this info in your Corona "build.settings" file as plist keys... Corona takes care of all that when you build by reading the mobileprovisioning profile data.

--------------------------------------------
5. Provisioning
--------------------------------------------

- Jump through the hoops to get the files. I recommend making all three kinds: dev, hoc and store.
- I recommend using friendly reminder names for your provisioning profile titles like:

silly_app_dev
silly_app_hoc
silly_app_store

That was you can easily identify which files are which. because the end result will be actual files you have to manage.

--------------------------------------------
6. Check what you've got
--------------------------------------------

Don't install any of the provisioning profiles or certificates until your sure you've got everything handy.

You should have the following files:
- developer_identity.cer
- distribution_identity.cer
- silly_app_hoc.mobileprovision
- silly_app_dev.mobileprovision
- silly_app_store.mobileprovision

--------------------------------------------
7. Install the files
--------------------------------------------

Drag and drop the following files (one at a time) onto the KEY CHAIN application icon:
- developer_identity.cer
- distribution_identity.cer

Drag and drop the following files (one at a time) onto the XCODE application icon:
- silly_app_hoc.mobileprovision
- silly_app_dev.mobileprovision
- silly_app_store.mobileprovision

XCODE should automatically pair up the mobileprovisioning files with the certificate files.

You'll have to open the "organizer" window to validate that xcode synced everythign OK.

XCODE > Main Menu > Window > Organizer

The side bar has "developer profile and "provisioning profiles" in the list, there shouldn't be any errors in any of those views.

If there are errors:
-- Stop here and start all over from scratch.
-- Pay close attention to the name and email address you use when setting up your certificates. (use the ones you used when setting up your developer account.
-- When creating the certificate authority request files, use the same names and emails as above.

--------------------------------------------
8. Setup Your app
--------------------------------------------
Log into developer.apple.com and go to "iTunes connect" and set up your app. You should have all the necessary information by this time to set up the app correctly. You'll need to keep the mobile provisioning identifier handy... what ever you decided to use.

e.g. com.boob.silly_app

[user slgilley said:] Once you enter all the information about your app and submit, the app will be in the "Preparing to Upload" state.

Before the running the application loader, you MUST click on the "Ready to Upload" button/link.

--------------------------------------------
9. Build
--------------------------------------------

Follow the instructions in the Corona docs for creating the app.

NOTE: See elbowromapps's comment in the replies to this post below... "Corona has made some changes that made step 9 a little easier."

IMPORTANT: After creating your app, right-click on it and zip it up. (Application Loader needs the app to be zipped).

Launch "Application Loader", which is a utility in your XCODE folder:
Mac HD > Developer > Applications > Utilities > "Application Loader"

(You may have to download this " Application Loader " application from Apple)

Follow the steps to upload to the app store.

IMPORTANT: If you get the " application failed codesign verification " error, check that your Corona project folder and the folder that your outputting the "app" file to doesn't have any spaces or funcky characters.... including the full system path.

Good:

/User/boob/Desktop/silly_app/main.lua
/User/boob/Desktop/silly_app/silly_app.app

Bad:
/User/boob/Desktop/I'm dumb/silly app i'm working on/main.lua
/User/boob/Desktop/I'm dumb/build the silly app/my silly.app

All other errors refering to issues with certificates are due to complications with multiple mobile provisioning profiles, certificates and keys in Key Chain and XCODE and/or, look in:

/Users/your_user_name/Library/MobileDevices/Provisioning Profiles/

That's where XCODE puts the provisioning profiles when you drag and drop them onto the XCODE icon.

--------------

So I went through this process, like, 302 times. So don't feel bad if you have to as well. It's just part of the game.

Thank you!

I spent several hours trying to get all of this to work and tearing my hair out. Then I found and followed your instructions and that solved my problem. So many thanks!

I found that code signing of Xcode does not support network account.

-- Advanced UI + Graph for Corona® | Website | Forum (https) | See:

One addition to this.

In step 8, once you enter all the information about your app and submit, the app will be in the "Preparing to Upload" state.

Before the running the application loader, you MUST click on the "Ready to Upload" button/link.

Other than that, my big problem was finding the blasted application loader. To repeat what's above, it's at:

Mac HD > Developer > Applications > Utilities > "Application Loader"

Wish I'd seen this post earlier...

Sean.

Thanks very much for your step by step guide. I have them all memorized and have done them many times yet is am still getting the error in Application Loader that says "The signiture was invalid, or it was not signed with an Apple submission certificate". Let me ask, when you finally did get it to work, was there one last thing that you realize was missing or did it just work magically without really changing anything? Anyway, thanks for your guide. i am still struggling but hopefully will succeed soon!

Is it really necessary to get new certificates every time?

This is the only place I've seen anything like that mentioned.

Vote for sticky

Is it really necessary to get new certificates every time?
This is the only place I've seen anything like that mentioned.

That part is a bit paranoid. There are probably times people have hit bugs that needed new certificates to fix, but I only ever got certificates back when I first joined the developer program.

Now provisioning profiles, that you do need to redo for every app ID (and every build situation within that ID: dev, ad hoc, release.)

Thanks for this post. I just submitted my first app by following your instructions here.

Corona has made some changes that made step 9 a little easier. I did a build and selected the app_store profile. When the build was completed, Corona popped up a window that said my app was ready to submit, with a button to start the upload to the app store. Corona had already created the zip version of the app. I hit the corona button, and it started up the "Application Loader" for me.

This is a nice presentation; thanks for the effort! Where it took us some time was getting Certificates nailed for a remote developer so he could then build, and copy build to his device. That was not well documented anywhere (that we could find).

I'll use your list on my first submission; see how it goes!!

I'm not sure if it was smart or not, but I used the SAME certificate request (only generated it once in KeyChain) for BOTH the dev and distribution certificates and the provisioning portal did not complain and issued me both certs. I've not tried uploading yet, but since it's just a signing doc, I'm thinking I'm probably good.

But here's my real question....for step 8, when you set up your app, you have to specify the Provisioning profile to use. The web UI says that IT CANNOT BE CHANGED after you set it. So if something doesn't work, how do you re-attach a new app-store profile to the app?? I'm afraid of setting this because I don't know how to undo it if something goes bad?

Any thoughts or feedback?

dgaedcke,

Yes, you can use the same certificate request for both dev and distribution. I have done that before -- and at other times used different ones. Either way is fine. They are considered 'signed' in both cases.

Regarding your second question: As far as I know, the Web UI is referring only to your "Bundle ID", which cannot be changed. But you can always create a new provisioning profile at any time if something goes bad. So don't worry about it.

In the past, I have had to re-create provisioning profiles and certs, and re-build several times trying to get the Application Loader to upload.

+1

Stickied.

Excellent!!..thanks for the feedback guys.

What version of Xcode should I have installed to build for the store with the minimum of headaches??

Right now I have Version 3.2.6 64bit installed on Snow Leopard

views:1909 update:2011/10/4 8:06:35
corona forums © 2003-2011