Chapters

Hide chapters

iOS Apprentice

Eighth Edition · iOS 13 · Swift 5.2 · Xcode 11

Before You Begin

Section 0: 3 chapters
Show chapters Hide chapters

My Locations

Section 3: 11 chapters
Show chapters Hide chapters

Store Search

Section 4: 12 chapters
Show chapters Hide chapters

43. Distributing the App
Written by Eli Ganim

What do you do with an app that is finished? Upload it to the App Store, of course! And with a little luck, make some big bucks…

Throughout this book, you’ve probably been testing the apps on the Simulator and occasionally on your device. That’s great, but when the app is nearly done, you may want to let other people beta test it.

In this chapter, you’ll learn how to beta test the StoreSearch app. After that, I’ll also show you how to submit the app to the App Store, which is basically an extension of the same process.

By the way, I’d appreciate it if you don’t actually submit the apps from this book. Let’s not spam the App Store with dozens of identical StoreSearch or Bull’s Eye apps.

This chapter will cover the following:

  • Join the Apple Developer program: How to sign up for the paid Apple Developer Program.
  • Beta testing: How to beta test your app using Apple’s TestFlight service.
  • Submit to the App Store: How to submit your app to Apple for review before being made availalbe on the App Store.

Join the Apple Developer program

Once you’re ready to make your creations available on the App Store, it’s time to join the paid Apple Developer Program.

To sign up, go to developer.apple.com/programs/ and click the blue Enroll button.

On the sign-up page you’ll need to enter your Apple ID. Your developer program membership will be tied to this account. It’s OK to use the same Apple ID that you’re already using with iTunes and your iPhone, but if you run a business you might want to create a new Apple ID to keep things separate.

You can enroll as an Individual or as an Organization. There is also an Enterprise Program, but that’s for big companies who want to distribute apps within their own organization only. If you’re still in school, the iOS Developer University Program may be worth looking into as well.

You buy the Developer Program membership from the online Apple Store for your particular country. Once your payment is processed, you’ll receive an activation code that you use to activate your account.

Signing up is usually pretty quick. In the worst case it may take a few weeks, as Apple will check your credit card details and if they find anything out of the ordinary — such as a misspelled name — your application may run into delays. So make sure to enter your credit card details correctly or you’ll be in for an agonizing wait.

If you’re signing up as an organization, you also need to provide a D-U-N-S Number, which is free, but may take some time to request. You cannot register as an organization if you have a single-person business such as a sole proprietorship or DBA (“doing business as”). In that case you need to sign up as an Individual.

You will have to renew your membership every year, but if you’re serious about developing apps, then that $99/year will be worth it.

Beta testing

You will be distributing your app for beta testing via Apple’s TestFlight service.

TestFlight

In the early days of iOS development, the only way to send builds to testers was via what was known as Ad Hoc distribution. You had to register specific devices for Ad Hoc distribution — for which you needed to know the unique ID for the device — and there was a limit of 100 devices per developer account. You could only reset the devices in this list once per year, when you renewed your developer account.

Additionally, you had to go through a complicated manual signing process to sign builds for Ad Hoc distribution and you had to send these builds out to your users and hope that they could figure out how to install the builds on their devices and troubleshoot any installation issues by themselves, or provide you enough information to help them figure out what was going on.

All this changed with the introduction of Apple’s TestFlight service.

TestFlight allows you to distribute your beta builds to 10,000 testers and all you need is just their e-mail address!

What’s more, the process itself is fairly straightfoward since you simply build your app in Xcode and upload to the App Store. The app binary would go through some processing at this point and once the processing is complete, you are able to offer the app for testing to your internal testers immediately.

In addition to the 10,000 external testers, you can also have internal testers from your organization. The internal tester count is limited to 25 people — each of whom can run your app on up to 30 devices — and they have to be part of your Apple Developer team. If you signed up as a single developer, this probably would not work for you since you can’t add additional members to your team on the Apple Developer portal. On the other hand, if you signed up as an organization, then you can start testing immediately.

If you want to distriute to external testers — the 10,000 testers mentioned earlier — you do have to go through an initial review of your app by Apple. This process is usually quite fast and takes about a day. This generally has to be done only once per new beta build — for the very first beta build. After that, you can simply push out new builds without needing to wait for approval from Apple.

To add new users to beta test, you simply invite them using their e-mail address. They will receive an invitation e-mail which they can accept, or reject by simply ignoring the e-mail. If they accept the invitation, they are prompted to install the TestFlight app which will handle installing beta builds and notifying users of updates to beta builds from then on.

You can read more on TestFlight at: https://developer.apple.com/testflight/

Apple Developer portal

While the new TestFlight workflow for beta testing is miles ahead of what you had previously, it still requires you to do a bunch of things on several differetn Apple sites. You start out on the Apple Developer portal where you need to create an App ID for your new app.

➤ Open your favorite web browser and navigate to your account details page at developer.apple.com/account. You might need to sign in if you are not logged in. Once you are there, click on Certificates, Identifiers & Profiles.

Tip: If you have trouble using the site and you are not using Safari, try using Safari. Other browsers can throw up weird issues sometimes.

Note: Like any piece of software, the Apple Developer Portal changes every now and then. It’s possible that by the time you read this, some of the options are in different places or have different names. The general flow should still be the same, though. And if you really get stuck, online help is usually available.

➤ Click on App IDs under Identifiers in the sidebar — you should get a list of existing app IDs. Press the + button on the top right to add a new App ID:

Creating a new App ID
Creating a new App ID

➤ Fill in the App ID Description field. This can be anything you want — it’s just for your reference on the Provisioning Portal.

➤ The App ID Prefix field contains the ID for your team. You cannot modify this value.

➤ Under App ID Suffix, select Explicit App ID. In the Bundle ID field you must enter the identifier that you used when you created the Xcode project. Here that is com.raywenderlich.StoreSearch.

The Bundle ID must match with the identifier from Xcode
The Bundle ID must match with the identifier from Xcode

If you want your app to support push notifications, In-App Purchases, or iCloud, then you can also configure that here. StoreSearch doesn’t need any of that, so leave the other fields on the default settings.

➤ Press Continue and then Register to create the App ID. The portal will now generate the App ID for you and add it to the list.

The full App ID is something like U89ECKP4Y4.com.yourname.StoreSearch. That number in front is your Apple Developer Team ID.

App Store Connect

Next, you need to add your app to App Store Connect.

➤ Navigate to appstoreconnect.apple.com via your browser of choice. Again, try using Safari if you run into any issues with the App Store Connect site.

➤ Log in using the same Apple ID that you used to sign up for your Apple Developer account.

➤ The first screen you see will look something like the following — if you are not an administrator for the App Store Connect account, you might see fewer options on the screen than in the screenshot.

Initial App Store Connect screen
Initial App Store Connect screen

➤ If you’ve never been to App Store Connect before, then make sure to first visit the Agreements, Tax, and Banking section and fill out the forms. All that stuff has to be in order before your app can be distributed on the App Store.

➤ Select My Apps — this is the option you need to manage everything related to your apps. You create new app entries, edit existing ones, and manage your beta testing and app distribution tasks all from there.

The page you are taken to lists your existing apps, if you have any. It also allows you to add new apps to App Store Connect.

The My Apps page on App Store Connect
The My Apps page on App Store Connect

Tip: If you are stuck and don’t know what to do, you can use the help icon on the top right to access guides and videos which might allow you to figure out how to use the App Store Connect site.

➤ Click the plus (+) icon on the top left to add a new app and then select New App from the menu.

Add a new app on App Store Connect
Add a new app on App Store Connect

➤ This should present you with a new dialog for entering the basic information necessary for an app.

New app information on App Store Connect
New app information on App Store Connect

Select the checkbox for iOS (since yours is an iOS app), enter the name of your app, select the primary langauge from the dropdown and select the Bundle ID from the dropdown.

The Bundle ID would be the app ID you added on the Apple Developer Portal earlier. If you don’t see the app ID you added, try refreshing your browser or waiting for a bit in case the information has not updated on the Apple servers. Generally, the information should be reflected almost immediately.

Tip: If you are not sure about what you are supposed to enter for a particular field, you can always click on the question mark icon next to each field to get a hint as to what you should enter. Also note the hint in the above screenshot — you must have a bundle ID matching the ID you have in Xcode for your project. Otherwise, the upload from Xcode will fail.

The last value you have to enter is the SKU (or “skew”), which stands for Stock-Keeping Unit. This one confuses people a bit since it can be any unique value for your company. Basically, Apple does not care what this value is — it’s only used for reporting purposes. It has to be unique for your apps. So, for example, if you use 1001 as the SKU for your first app, you can’t use 1001 as the SKU for your second app.

➤ Once you’ve filled in all the information, click Create and your new app will be added to App Store Connect — if there are no errors.

If your app name has been used before — by anybody, not just you — for another app, or if your Bundle ID is not unique, or if your SKU has been used before, you will get an error message at this point. You would have to fix these issues and try again if this happens. Generally, it’s the app name which gives you problems — so it’s always a good idea to figure out if the name you selected is in use before you try to add a new app to App Store Connect.

That’s all you need to do at the App Store Connect end for the time being.

Upload for beta testing

Once you have your app on App Store Connect, you can upload the app for beta testing — and later submission to Apple — quite easily.

➤ Start Xcode, if you’re not already running it, and then open the StoreSearch project.

➤ In the Project Settings screen, in the General tab, choose the correct Team. As you noticed when you created the App ID, the team ID is connected to your App ID. So make sure that you have the right team selected here, otherwise you will run into issues later when you try to upload the build …

Choosing the team
Choosing the team

➤ Change the device in the active sheme selector, on the Xcode toolbar, to Generic iOS Device.

Selecting Generic iOS Device
Selecting Generic iOS Device

Normally, when you build your app, you build for a specific Simulator or for a connected device because your intention at that point is to run the build on that particular Simulator or device.

But when you build for distribution, you have no idea which particular device a build would run on. So, you have to build using the generic device setting in order to ensure that the resulting app would be compiled correctly to run on all supported devices.

➤ Select Product ▸ Archive from the Xcode menu.

Create app archive
Create app archive

If the Archive option is disabled, then you probably did not select the Generic iOS Device from the active scheme selector as per the previous step. You can only build an archive if you have the Generic iOS Device selected.

The app will compile the project and link it. If everything goes smoothly, Xcode should open the Organizer window and and display the new archive which was just created.

The Organizer window
The Organizer window

You are now ready to upload the build to the App Store, as the big blue button on the right sidebar testifies.

You can simply click the big blue button, or, you can click the Validate App button below it to verify that your app passes all of Apple’s initial validations. The validations are run even if you use the Distribute App button but the Validate App button is an easy way to check your app locally and verify that it passes muster before you upload it to the Apple servers.

➤ Click the Distribute App button.

You will be asked for the method of distribution:

App distribution method
App distribution method

You would, of course, want to select iOS App Store for this one.

Then you need to select the destination:

Destination options
Destination options

Here, you can opt to upload the binary file directly to the Apple servers or to create an export file that you can upload later. This option can be useful for situations where you are unable to upload via Xcode for some reason — it happens, more often than you might think.

Next, you need to select some distribution options:

App Store distribution options
App Store distribution options

Each of the options has some helpful text describing what the option does — so you can basically go with the options that are suitable for you. If you are not sure, there should not be any harm in keeping all of the options checked.

Tapping Next will take you to another dialog:

Code signing options
Code signing options

➤ Generally, it’s best to go with Automatically manage signing unless you know what you are doing. The manual option gives you a lot more flexibility, but you also have to deal with the complexity that comes along with it — with great power comes great complexity.

Tap Next to proceed and Xcode will work for a while signing your app and getting it ready for upload. When Xcode is ready, it should show you a screen similar to the following:

Ready to upload app
Ready to upload app

➤ Click Upload and Xcode will start uploading the binary for your app to the Apple servers. Depending on the size of your app — and the speed of your network connection — this might take a bit of time.

While the upload is in progress, you’ll get a progress indicator and status messages indicating what is going on. If the upload completes successfully, you should get a message similar to the following:

App Store Connect app upload successful
App Store Connect app upload successful

If the upload completes successfully, that’s all you have to do at the Xcode end.

Sometimes though, you might get an error.

Some of these errors are basically incomprehensible since they might just be an App Store error code and a cryptic message. If your are unlucky enough to get one of those, you might have to Google for the error code and see if you find somebody else who has figured out the issue. Usually, it turns out to be an Xcode issue or an App Store issue that is resolved by Apple a few days later.

On the other hand, you might get specific error messages such as your app missing the app icon, or an app icon for a specific size that App Store Connect expected. In such cases, fixing the issue by adding the missing assets and then creating another archive — you can’t re-use the previous one — and uploading that should resolve the issue.

Sometimes, you might also get warnings, like the following:

App Store Connect error about specific issue
App Store Connect error about specific issue

The above indicates that the currently uploaded build is fine as far as passing the general validation goes, but that it’s missing an icon. While this is just a warning, as the message indicates, you still cannot use this build for external beta testing or for submitting to the App Store for review. So you’ll need to fix the issue and upload a new build.

One thing you have to watch out for when uploading several builds for the same app to the Apple servers is the build number …

Build number

Each build you submit to Apple has to be uniquely identifiable. How this is generally done for Xcode projects is by combining the version number and build number for the project to get a unique value.

But where is this version number and build number, you ask? Easy enough.

In Xcode, go to your project root in the Project navigator, select your project target, go to the General tab, and then check the Identity section.

Xcode version and build numbers
Xcode version and build numbers

For each new version of your app, you need to increment your version number. For each build you submit for a version, the build number has to change too, but, while you cannot repeat a version number, you can repeat a build number as long as the same build number is not used within a given version.

So, for example, you can have the builds for version 1.0 start from 1 and go up to however many builds as you like. And while you cannot use build number 1 for another build for version 1.0, if you start a new version, say 2.0, then you can start the build numbers for the new version again from 1 and go up incrementally.

So, if you’ve already uploaded a build to App Store Connect and you have to upload another build — either because of an error or because you made a code change — then you need to remember to change the build number. If you don’t, you’d get an error during the upload process.

App Store Connect error about build number
App Store Connect error about build number

Change the build number in your project settings, create a new archive, upload it and you should be good to go!

Check your upload

You can check on the status of your uploaded build by logging into App Store Connect.

➤ Select My Apps from the main dashboard to get a listing of your apps and then select the StoreSearch app from there.

➤ You’ll be taken to the app detail screen on App Store Connect:

The app details on App Store Connect
The app details on App Store Connect

This is the screen where you would manage everything to do with a given app. You can edit the app information, add screenshots, change the price information, submit builds for review, and check the status of a build.

➤ Click on the Activity tab at the top, on the second row of text from the top. This should take you to the latest activity for this particular app.

The activity page on App Store Connect
The activity page on App Store Connect

As the screen shows, your app is still processing. This can sometimes take a bit of time, though most of the time, the process is pretty quick. Once the processing is complete, you should receive a notification e-mail from Apple indicating that your app had completed processing and is now available for either testing or distribution.

Internal testing

As was mentioned before, there are two test modes for TestFlight — internal and external. Once your app upload completes processing, you can immediately start internal testing.

➤ Log in to App Store Connect and go to your app’s detail screen. From there, select TestFlight from the list of tabs at the top.

The TestFlight page on App Store Connect
The TestFlight page on App Store Connect

As you might notice, your app build has a warning — it’s apparently missing compliance information. This is standard for all builds unless you provide the compliance information beforehand. The easiest way to fix this is to click on the blue “1” next to the app icon — that is a link which would take you to the detail information page for this particular build — build #1.

The build detail page on App Store Connect
The build detail page on App Store Connect

There, at the top of the page, is a big Provide Export Compliance Information button! Click on the button, go through another screen where you specify whether your app uses encryption or not, and you should be done with the export compliance stuff till you upload another build.

The above screen also has a place to add testers for this build. So, you might think that is where you add testers for your app. Well … yes, and no.

To add internal testers for your app, you actually have to go to the App Store Connect Users link on the left of that screen. That takes you to a new screen from where you can select up to 25 existing users in your team to be added as internal testers.

If you don’t have any team members at the moment though, you would need to first go back to your App Store Connect dashboard, select the Users and Roles option, add some team members — and optionally, assign them the role of tester — and then come back and add the newly created users as internal testers for your app.

The selected team members will be notified via e-mail that a new build is ready for testing and they will be asked to install the TestFlight iOS app so that they can participate in the testing process.

Internal testing, as the name implies, is generally for testing within your team. So Apple does not require your beta build to go through any sort of review before you start testing. But internal testing is also limited to just 25 people at most.

If you want to do more extensive beta testing, then you have to opt for external testing.

External testing

External testing allows you to distribute beta builds of your app to 10,000 testers. But before you can start inviting testers, you have to get your beta build approved by Apple.

Before you can submit your beta build to Apple for review, you have to fill in the relevant test information for the particular build you want tested.

➤ Go to App Store Connect, select your app, and on the app detail screen, go to the TestFlight tab. There should be an item named Test information on the left sidebar. Select it.

Enter test information on App Store Connect
Enter test information on App Store Connect

Fill in at least the Feedback Email and the whole Beta App Review Information section towards the end of the page before the warning at the top about completing test infomration goes away. However, it is possible that Apple may change these requirements from time to time. Once you are don, click Save.

➤ Go to the Builds - iOS item on the left sidebar. Your build should now appear as “Ready to Submit” for the External Testers column.

The build is ready for beta review
The build is ready for beta review

➤ Go into the build details screen by clicking the blue “1” next to the app icon.

➤ Before you can submit the app for beta review, you need to add at least one external beta tester. So, use the Add Testers to this Build link towards the bottom of the screen or the blue plus (+) icon above it — use the Add New Testers option — to start adding some external testers.

Add external testers for your app
Add external testers for your app

➤ This shows a new dialog where you can add external testers by e-mail address. Add one or more testers here.

The dialog for adding new testers
The dialog for adding new testers

➤ When you are done adding testers, click the Next button.

This shows another screen which asks for sign in information in case your app requires a login.

This is so that the Apple personnel reviewing your beta build have all the necessary information in order to test your app. Since StoreSearch does not require any login information, you can indicate that no sign in is required and proceed to the next screen.

The submit for beta review dialog
The submit for beta review dialog

➤ Enter some text here explaining what you need tested — and perhaps what changes were made since the last build if this is a subsequent beta build — and then click Submit for Review to start the beta review process.

Now, you wait!

Generally, you will hear back from Apple within a day or two. If the Apple review team finds any issues with your app, they will let you know and you would need to fix the issues and submit another build and go through the review process again till you succeed.

If the app passes review, then it will be in “Testing” state for external testing and your external testers will be notified via e-mail that a new build is ready for them to test. This will start off the beta cycle for your app. Congratulations!

At this point, all you have to do is wait for feedback from your beta testers, fix any issues they find or make changes based on beta feedback, release another beta build. You rinse and repeat till you are certain that your app is ready to be submitted to Apple for review in preparation for release.

Submit for review

When your beta testing is complete, you can submit the final build which passed beta testing for App Store review instead of uploading yet another build to App Store Connect. This way, you bypass the potential for accidental introduction of any new bugs when you create a new build.

Since the build was already uploaded to the Apple servers when you uploaded it for beta testing, you simply have to move on to the next stage in the process using the correct build.

At this point, if you only entered the bare minimum information to add an app to App Store Connect, you might need to provide some additional information for the app as well.

➤ Go to your app’s detail screen and then select the App Store tab and then the App Information option from the left sidebar.

On this screen, make sure that the Category values are filled in correctly for your app. You can select any category from the dropdown here but do try to make sure that the categories you select are relevant for your app.

➤ Select the Pricing and Availability option from the left sidebar and set a price for your app. And if you want your app to be available in only specific App Stores around the world, you’d set that here via the Availability section.

You need to do the above two steps only once for every new app. All the other information changes you make below, might have to be done for every new release.

➤ Next, click on the Prepare for Submission link on the left sidebar with a yellow circle next to it. This is where you enter all the relevant information for each version that you submit to the App Store. Here, you’d need to complete at least the following information — you can fill in more values than the listed ones, but these are the mandatory ones:

  • You can upload up to ten screenshots and three 30-second movies per device. At a minimum, you need to supply screenshots for the 5.5-inch iPhones, and the 12.9-inch iPad Pro. If you do not provide screenshots or videos for the smaller screen devices, the assets from the larger screen devices will be scaled down for the smaller screens.
  • A list of keywords that customers can search for — limited to 100 characters.
  • The URL for your support page.
  • A description that will be visible on the store.
  • The build to submit — this is the build that passed your beta testing. You can click on the plus icon (or use the link in the box) to get a list of uploaded builds and select the correct one from there.
  • A 1024×1024 icon image. This image is automatically picked from the binary for builds created with Xcode 9 or later. If you happen to build your app with an older version of Xcode, you would need to upload the icon yourself.
  • Copyright information.
  • The version number.
  • The app rating — this is to identify whether your app contains potentially offensive content. You have to select from a list of items to determine your final content rating.
  • Your contact details. Apple will contact you at this address if there are any problems with your submission.
  • Sign-in information. If your app requires a user login to test its functionality, provide the necessry demo user name and password here. If a demo login is not required, remember to uncheck the Sign-in required checkbox. Otherwise, you will get an error when you try to submit the app.
  • Notes for the reviewer. These are optional, but it’s good to provide some notes if the reviewer needs to do anything special in order to test your app.
  • When your app should become available

If your app supports multiple languages, then you can also supply a translated description, screenshots and even an application name.

For more info and help, consult the guides available under Resources and Help on the home page.

Make a good first impression

People who are searching or browsing the App Store for cool new apps generally look at things in this order:

  1. The name of the app. Does it sound interesting or like it does what they are looking for?

  2. The icon. You need to have an attractive icon. If your icon sucks, your app probably does too. Or at least that’s what people probably think and then they’re gone.

  3. The screenshots. You need to have good screenshots that are exciting — make it clear what your app is about. A lot of developers go further than just regular screenshots; they turn these images into small billboards for their app.

  4. App preview videos. Create up to three 15 to 30-second videos that show off the best features of your app.

  5. If you didn’t lose the potential customer in the previous steps, they might finally read your description for more info.

  6. The price. If you’ve convinced the customer they really can’t live without your app, then the price usually doesn’t matter that much anymore.

So, get your visuals to do most of the selling for you. Even if you can’t afford to hire a good graphic designer to do your app’s user interface, at least invest in a good icon. It will make a world of difference in sales.

After filling out all the fields, click the Save button at the top. When you’re ready to submit the app, press Submit for Review.

If you missed any information, you will get an error message at the top of the screen indicating the errors. The error message will be accompanied by a link which takes you to the page with the missing (or invalid) information. Also, the fields with missing information will be highlighted in red or have a red circle with an exclamation point next to the title (or both). This will help you identify what information needs to be filled in, or corrected.

Once you fix the issues, save and try submitting again. Sometimes, you have to do this multiple times before you finally succeed!

Once you successfully submit your app, it enters the App Store approval process. If you’re lucky, the app will go through in a few days, if you’re unlucky it can take several weeks. These days the wait time is fairly short. See http://appreviewtimes.com for an indication of how long you might have to wait.

If you find a major bug in the mean time, you can reject the file you uploaded on App Store Connect and upload a new one, but this will put you back at square one and you’ll have to start at the bottom of the app review queue once again.

If, after your app gets approved, you want to upload a new version of your app, the steps are largely the same. You change the version in Xcode (and change the build number), upload the new version to App Store Connect, update the information in the Prepare for Submission screen and re-submit.

Updates take about the same amount of time to get reviewed as new apps, so you’ll always have to be patient for a few days.

The end of part 1

Awesome, you’ve done it! You made it all the way through the UIKit part of The iOS Apprentice. It’s been a long journey but I hope you have learned a lot about iOS programming, and software development in general.

Credits for StoreSearch: The shopping cart from the app icon is based on a design from the Noun Project (thenounproject.com).

Are you ready to learn how to write apps in SwiftUI? Buckle up and move to the next section!

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2026 Kodeco Inc.