Translate

Tuesday, June 12, 2012

How to Submit Your App to Apple: From No Account to App Store, Part 2

This is a blog post by iOS Tutorial Team member Gustavo Ambrozio, a software engineer with over 20 years experience, including over three years of iOS experience. He is the founder of CodeCrop Software.
Learn how to get your app all the way to the App Store!

Learn how to get your app all the way to the App Store!
So you’re on your way to being a big iOS developer, eh? You’ve jumped through Apple’s hoops, paid your $99 fee, and had your brilliant app idea. Maybe you even put it all together and got it running in Xcode.
What, you haven’t finished coding your app since reading How to Submit Your App to Apple, Part One? No matter. There are other tutorials that cover that.
This is the tutorial series explaining the basics of how to register as an iOS Developer, and how to interface with Apple’s portals to test and then submit your apps for approval.
In Part One, we went through the developer registration process, and we used the iOS Provisional Portal to register our devices and to create the certificates and profiles Apple requires to test and submit our apps.
Now in Part Two, we’ll configure an app to run on the devices we registered, we’ll use iTunes Connect to send Apple all the information it needs to pay you for your apps, and finally, we’ll submit an app to Apple for approval.
Ready to jump from beginning developer to approved seller? (At least virtually.) Then read on!

Getting Started

OK, that section header is a fake-out. Before we actually get started, I wanted to show you an easier way to get your apps running on your devices than setting up the provisioning profiles manually like we did in part 1.
Don’t be mad that I showed you the hard way first… believe me, you’re going to need to do it that way someday. You should be relieved you already know how!
The truth is, in some situations, such as when working with more than one developer account, the automatic provisioning I’m about to show you just does not work. But here’s how to do it to save yourself time, when you can:
Open Xcode if you haven’t already. Note that for this tutorial, I’m using the latest version of Xcode as of the time of writing, version 4.2.
Once in Xcode, open the Organizer (CMD-SHIFT-2). Plug in your iOS device and go to the Devices tab. Your screen should look something like below. Click “Use for Development”:

After a few seconds, Xcode will ask you for your credentials. Enter your iOS Developer’s credentials and click “Log in”:

Initially you should not see much:

Why did Xcode ask for your credentials? Because it’s going to connect automatically to the Provisioning Portal for you and add the device you’ve connected to your device list (if it isn’t there already). Then it will create a provisioning profile called “iOS Team Provisioning Profile,” which you should soon see displayed in your Xcode window:

From now on, whenever you plug in a new device and click “Use for Development” in Xcode’s Organizer, it will add the device to your account and update your Team Provisioning Profile so you don’t have to go to the provisioning portal all the time. You can then use this provisioning profile when testing your apps in your device.
Pretty easy, eh? :]
You can turn this behavior on and off by checking or unchecking this box in the organizer:

BUT: as I said, there will be times you’ll still need to know how to do these things using the Provisioning Portal, so it’s a good thing I showed you the hard way first. Some situations in which you’ll need to know the old-school way:
  • You’re working for a person or company that has their own account, and you need to use their account instead of your own.
  • You’re building a beta version of an app for someone’s device and you don’t have access to the device itself, just the UDID.
  • You need to test push services or in-app purchases. For this you need a provisioning profile with a bundle ID that is not the wildcard *. The Team Provisioning Portal bundle ID is *. As you might remember from the first part of this tutorial, * works with every app, but does not allow you to test push services or in-app purchases, so in this case you need a provisioning profile with a unique bundle ID.
  • You want to be the cool kid that does not use these “generic” profiles and has a profile for every app. OK, maybe I’m trying to boost my ego with this one…
Well, now I’ve got this weight off my shoulders let’s get started with our first real task for this tutorial: preparing the app to run on your device.

Running Your App on Your Device

For this section of the tutorial, we need an app to test in your device. I’ll use cute-a-pult, the app from my last tutorial, “How To Make a Catapult Shooting Game with Cocos2D and Box2D.” You can download the final project here.
The version of the app I submitted to the App Store is an improvement on the original project, done with LevelHelper and SpriteHelper. Some day I might even write a tutorial on how I did this.
If you already have an app of your own that’s ready to test, feel free to use it instead, or use any of the other great apps from Ray’s site.
Open the project you chose (mine, your own, or one from Ray’s site) in Xcode. Open the project navigator and click on the project node of the tree (1), then click on the target (2) and fill out the app version and deployment target (3):

Note that deployment target is a fancy way of saying “the minimum version of iOS that your code supports.” Be careful though, because if you set this to iOS 3.0 and use an API that is only on iOS 5 without checking first, your app will crash! The safest thing to do is to test your code on a device running the oldest version of iOS you want to support (I know, easier said than done!)
For this tutorial, just set it to 4.0.
Next, click the “Info” tab and change the bundle identifier. This should be the same bundle identifier you used for the App ID you registered in the Provisioning Portal:

Next we need to point Xcode to the provisioning profiles. Click on the “Build Settings” tab and search for the word “signing.” In the search results list, click on the cells indicated and choose the correct provisioning profiles from among those presented by Xcode.
You should choose the developer profile for the Debug build, and the distribution profile for the Release build.

We’re almost ready to build. Before we do, choose to build for the device using the scheme chooser:

CMD-B to build the project. If there are any problems with your profiles, you’ll see something like this:

Click the log navigator on the left to check the problem. In my case, I created a provisioning profile with the bundle identifier as “com.codecrop.cute-a-pult,” but my app has the bundle identifier set to “com.codecrop.cuteapult”:

Let’s fix this. Click the project navigator (1), click the project tree node (2) and change the bundle identifier (3). Hit CMD-B to build again.

Now everything should be OK:

Connect your iOS device to your computer and hit CMD-R to run the app. In a few moments you should see your app running on your device! Finally!
Next I’ll show you how to submit your project to Apple for approval. For this, we’ll have to log into iTunes Connect.

Last Stop: iTunes Connect

Now it’s time to get to know iTunes Connect. Go to https://itunesconnect.apple.com and log in with your new iOS Developer credentials.
The first time you connect, you’ll have to accept the Terms of Service. By now you know the drill: lawyer, checkbox, “Accept Terms.” It might be a good idea to keep that lawyer on a retainer…

There are a lot of things to do here in iTunes Connect. I’ll show you the basic steps to get your app submitted, but if you want the gritty details you can check the complete (currently almost 200 pages long) iTunes Connect Developer Guide.
First things first: If you want to get paid for your apps, there is a lot of “paperwork” you must fill out. It’s better to get this stuff out of the way right now. It’s pretty boring and it will vary a lot from country to country but, seriously, if you want to get money from your apps you’ll have to endure it.
If all of your apps (or at least the first) will be free, you can skip this section and go right to “Submitting Your App,” below.
Hey, you’re still here? OK then, click “Contracts, Tax and Banking.”
You’ll have to electronically sign two contracts, one for apps and another for iAds. This is fairly quick, so even if you don’t plan to use iAds now, you should do it.
Click “Request”:

Phone lawyer (told you you should get a retainer), yada, yada, yada, checkbox, “Submit”:

You’re welcome!

Repeat for the iAd contract:



Are you bored yet? Hold on, it’s about to get worse…
It’s time to set up your contact information. Click the first “Set Up” button, under “Contact Info”:

Click “Add New Contact”:

Add yourself as a new contact. Since no one is looking, give yourself a nice title, like CEO or President. Click “Save” when done:

Assuming, as in Part One, that you are an individual developer and have no employees, you can set all contacts as yourself. Change every drop-down menu and click “Done”:

Now click the second “Set Up” button, under “Bank Info.” Again, since this is your first time here, you’ll have to first click “Add Bank Account”:

Choose your bank’s country. If you choose anything other than United States, be aware that the steps from now on may be different. Click “Next”:

Your bank’s ABA Routing number is located on your checks or statements, as indicated below in the orange box. Click “Next”:

Now you have to look for your bank’s branch. Look for one in your city but don’t expect to find an exact match for your branch. Don’t worry, it does not have to be exact. Click “Next”:

Check the information (again, don’t worry if the address is not exact) and click “Next”:

Now comes the important piece: your account number. This is also found on your checks or statements, as indicated in the blue box below. Fill out all the details for your account and click “Next”:

Confirm all the information, check the box indicating that it is correct, and click “Save”:

Now you can select this new back account and click “Save”:

We’re almost done. Click “Set Up” under “Tax Info.” You’ll at least have to fill out the US tax forms, as they are required for everyone. So go ahead and click to do so:

Fill out all the required information. Though the process should be straightforward for US citizens, you may have questions. Before coughing up money to speak to an accountant, make sure that your question can’t be answered in the W-9 instructions available for download from the upper-left corner of the page.

Scroll down, fill everything out, and refer back to the W-9 instructions if you need to. Make sure everything is correct and click “Confirm”:

Phew, that’s done! Now I promise you, the boring part is over. Better yet, if all was done correctly, you can get paid.

Submitting Your App

Before we go any further, if you really want to submit an app of your own instead of just following along, there are certain items you’ll need to get in order. Make sure you have the following ready before you even get started:
  • Your app’s name
  • Your app’s description
  • Your app’s icon sized 512px by 512px
  • At least one app screenshot. These should be sized 320×460 (no status bar); 320×480; 640×920 (retina, no status); 640×960 (retina); or, for landscape, 480×300 (no status bar); 480×320; 960×600 (retina, no status bar); or 960×640 (retina).
Once you’ve got all this assembled, click “Manage Your Applications” in iTunes Connect:

Click “Add New App”:

Choose the primary language of your app and your company name.
Be careful here. This is the only opportunity you’ll have to enter your company name. Once you click “Continue,” it will be very hard to change, so think about how you want your company name to appear in the App Store before proceeding. When you’re ready, click “Continue”:

Fill in the name of your app (it should at least be similar to the app name that appears under your app’s icon on the device), an SKU number (any number with two or more digits will do) and your bundle ID. The possible bundle IDs are pulled from the app IDs you registered in the Provisioning Portal, so choose the right one for your app.
Click “Continue” when ready:

Now you have to choose the availability date for your app. You have three choices:
  • You want your app to be available as soon as it’s approved. If this is the case, just leave the date as the submission date.
  • You want your app to be available at a certain date in the future. In this case, enter the date you want your app to be available. Please note that if your app is not approved by this date, then it will be released as soon as it’s approved. In other words, the date you enter is not a guaranteed release date.
  • You want to choose the release date once the app has been approved. In this case, change the year to next year, or a date far enough in the future that when your app is approved, you can come back and reenter the date you want.
Now choose your price tier or indicate that your app will be free. View the Pricing Matrix for more information about the price tiers.
Check the box if you want your app to be offered at a discount to educational institutions when they purchase multiple copies at once.
Once you’re done, click “Continue”:

Set the version number (should be the same as in your app’s Xcode project), fill out the description (this is what the users will see in the app store), and select the categories appropriate for your app.
Then consider the keywords.

Keywords are very important. Only your app’s name and keywords are indexed in iTunes’ search engine, so brainstorm words that potential users might think of using to find your app or your competitor’s apps. You can only change keywords when submitting updates, so choose wisely.
Fill out a copyright notice (generally just the release year and your name or your company’s name), a contact email and affiliated websites.
The Review Notes can be used for details about your app that you want the reviewer to know. For example, if users need to sign up at a website or even within the app in order to use your app, provide a couple of credentials here to make the reviewer’s life easier.
Here’s another example: if your app requires special hardware, explain that in the Review Notes section, and try to have a way for the reviewer to use the app without the hardware.
Scroll down and fill in the required information to determine your app’s rating. Be honest, as the reviewer can make changes to this section if they disagree.

Scroll down some more to submit your graphic assets. You have to upload your app’s icon and at least one screenshot. If your app is universal, you’ll need to submit one screenshot for the iPhone and one for the iPad.

After uploading, check order of the screenshots and click “Save”:

The app is almost ready to be submitted. We just need to do one more thing. Click “View Details” below the app’s icon:

On the next screen, click “Ready to Upload Binary”:

Answer the question honestly and click “Save.” If you’re using only the default cryptography libraries supplied by Apple’s API, it should be fine for you to answer “No” here.

You’ll be provided with some instructions telling you how to submit your app. Ignore these, as there is an easier way to submit using the latest version of Xcode. Just click “Continue”:

Now your app is ready for upload. Let’s go back to Xcode and finish this journey.

Submitting with Xcode

Your application should now be tested and ready to roll. All we need to do is submit to Apple for approval. This is surprisingly easy considering what we’ve been through already.
Go to Xcode and choose iOS Device in the scheme chooser:

Then choose “Archive” from under the “Product” menu:

If everything is okay with the build, Xcode will open the Organizer window with your app in the Archives tab. You don’t really need to click “Validate…” here because this will be done when you submit anyway, and Xcode should have already validated against most problems. So save yourself some time and click “Submit…”:

Enter your iOS Developer credentials and click “Next”:

Choose the app you want to submit and your submission identity. The identity is the provisioning profile you used to sign the app and should be pre-selected. Make sure everything is correct and click “Next”:

Your app will start uploading to iTunes Connect:

When the upload finishes, you should see this message. Just smile and click “Finish”:

You’re done now. You should receive a couple of emails from iTunes Connect telling you your app has been uploaded and is waiting for review. If you go back to iTunes Connect you should see your app changing status:

After a few minutes the status should change to “Waiting For Review”:

All you have to do now is wait for your app to be approved! You will receive emails about every change in status your app moves through. Usually after about a week the status should change to “In Review,” then to “Approved.” Unless you chose a future release date, a few minutes after approval your app’s status will shift to “Processing for App Store,” then a few minutes later to “Ready for Sale.”
If your app is not approved, Apple will email you with more information. They have gotten pretty good at being specific at what the exact problem is and how you can fix it, for the most part. If this happens, it’s no big deal – just fix the problem and re-submit.
Here are the exact dates and times that cute-a-pult achieved every step of the approval process (all times are UTC):
  • Waiting for Review: Fri, Jan 6, 2012 at 1:51 AM
  • In Review: Wed, Jan 11, 2012 at 3:43 PM
  • Processing for App Store: Wed, Jan 11, 2012 at 6:40 PM
  • Ready for Sale: Wed, Jan 11, 2012 at 6:41 PM
I also submitted an update of the app a few days later, with a last scene with the purpose of the app and a few links to my first tutorial post. Here is the timing for that:
  • Waiting for review: Fri, Jan 13, 2012 at 3:21 PM
  • In Review: Fri, Jan 20, 2012 at 3:31 PM
  • Preparing for the app store: Fri, Jan 20, 2012 at 3:53 PM
  • Ready for sale: Fri, Jan 20, 2012 at 3:55 PM
The time for reviews for your apps will vary based on traffic, but in general it takes around 5-10 days for most people.

No comments:

Post a Comment