IDEA TO APP STORE IN 10 DAYS, PART 8
Previously, I added the icon, color, and some style to ShopQuick. today, I’ll walk through the process of building and submitting to the App Store.
Uploading to the App Store – The Moment of Truth
When your app is ready to be sent out to the world, you’ll need to build it for distribution and upload to Apple. This is where your provisioning profile mojo will frequently be put to the test. Way back on Day 2, I mentioned the different kinds of provisioning profiles. To distribute the test builds of ShopQuick, I used In-House provisioning. For submission to the App Store, we’ll need to create and use an App Store provisioning profile. You can still use the same Production certificate to sign any of your distribution build
PROTIP: DO NOT LOSE YOUR PRODUCTION CERTIFICATE.
Depending on whether you build from Xcode or through the command line, you could experience some mismatch between your project settings and the selected provisioning profile. When that happens, you’ll get a build error during the code signing step. Alternatively, you can forego the code signing during the build process and wait until you upload your IPA to the App Store to choose a signing identity. This is a good option if you only want to build your code once — you can distribute to a QA team and then to the App Store without introducing potential code changes.
To build the IPA for distribution, I used Fastlane and defined a custom lane. I also updated the build number in the Info.plists and Root.plist (for the Settings screen) based on the number of git commits, as discussed in my previous post. Fastlane has a nice method called “incrementbuildnumber” that takes care of the Info.plist files, but the Root.plist needed a custom function. Creating the IPA is as easy as running “fastlane distro” from the command line.
A quick note about the version and build numbers: when you prepare to send an updated version of your app to the App Store, you will need to increment both the version (CFBundleShortVersionString, e.g. 1.0.1) and the build number (CFBundleVersion, e.g. 113) or your upload will be rejected.
Once the build succeeds, it will automatically be put in Xcode’s Archives (Window→Organizer)
From here, choose the specific build you want to upload to the App Store and press the “Upload to App Store…” button. You’ll be prompted to choose a team from which to get the signing information. If you didn’t choose the right team, don’t have the Production certificate installed on your machine, or don’t have the App Store provisioning profile installed, you will see an error:
At this point, the easiest thing is to make sure you chose the correct team (if you have more than one). To check if the Production certificate is installed, use the Keychain Access program on your machine. To check if the App Store provisioning profile is installed, look at your account details in Xcode (Xcode→Preferences→Account→View Details) and make sure the profile has been downloaded. If all else fails, retrace your steps using Apple’s documentation, i.e. burn it all down and start over.
If all goes well, you’ll receive a message that the upload succeeded (note that you might see a warning about API sizes — don’t worry about this). Your app is now out in the Apple ether, waiting for you to add it to the App Store.
iTunes Connect and App Information
To manage your apps in the App Store, you need to login to iTunes Connect (not the Developer Center where you created your app and provisioning profile). When adding a new app, you’ll be prompted for some basic info
Some important things to note when filling out this screen: all app names must be unique — this is the first time you will find out if your app’s name is already in use by someone else (and spaces don’t matter). I found this out the hard way, as the original name for the app, “Shop Fast,” is already in the App Store.
The bundle ID must exist on your developer account already and cannot be changed for your app once submitted.
As for the SKU, this is for your own tracking and reports, so unless you have a lot of apps, just enter something unique within your developer account. The SKU cannot be changed once submitted, either.
Any additional information is actually tied to a specific version of an app, so you’ll need to add a new version and enter the version of the IPA you just uploaded.
Next, you might expect that your IPA would be associated automatically since you uploaded an app and told Apple the version number to use. Nope. You will need to select the build using the “Build +” button. Note, if you just uploaded your file, it could take an hour or more before it is available to be selected.
In the meantime, you can fill in all of the other information about your app. You don’t need to fill in everything until the app is submitted for review. However, it’s important to note that once Apple does begin the review, some fields cannot be changed until you upload a new version of the app:
What can you change after submitting?
- Support URL
- Marketing URL
- Contact info
What is set in stone once review has started?
- iTunes App Store icon
- Screenshots and videos (Snapshot and frameit are great tools for this)
- App rating
Pricing and Availability
If you’re going to charge money for your app, you can set up pricing in the Pricing and Availability screen. This is where you can set the initial price as well as schedule a sale price.
The Pricing and Availability screen is also where you can disable Apple’s automatic bitcode recompilation and app thinning, although I can see no good reason to do this.
You can also configure the last compatible version of your app here. To support older iOS versions, Apple will make an older version of your app available to users whose devices don’t support your latest version. However, if you make breaking changes to your app that are not backward-compatible, you can make the fallback to certain older versions unavailable.
When all of your app’s info is set and the available IPA is selected, you can press the almighty “Submit for Review” button. And wait. And wait. And wait. At the time of this writing it takes about 6 days from submission to approval. Because Apple’s review times are so variable, there is a crowdsourced site to track how long it is currently taking.
Phase 3: Profit
Finally, when your app has passed Apple’s gauntlet, it will be ready for release to the App Store. Depending on the setting you chose for release, you may need to login to iTunes Connect and manually release this version. You could also have the app automatically release after a certain date.
And there you have it — from an idea to App Store (submission, anyway) in 10 days! Check back in next week for my last installment where I will talk about lessons learned.
Chris Trevarthen is an iOS developer at Detroit Labs. He shares his love of software craftsmanship with conference talks about test-driven development and team dynamics. Chris enjoys running marathons, his beer in a glass and his music on a turntable.