Preparing and Submitting an iOS 9 Application to the App Store

From Techotopia
Revision as of 20:14, 27 October 2016 by Neil (Talk | contribs) (Text replacement - "<table border="0" cellspacing="0"> " to "<table border="0" cellspacing="0" width="100%">")

Jump to: navigation, search
PreviousTable of Contents
Recording Audio on iOS 9 with AVAudioRecorder


Learn SwiftUI and take your iOS Development to the Next Level
SwiftUI Essentials – iOS 16 Edition book is now available in Print ($39.99) and eBook ($29.99) editions. Learn more...

Buy Print Preview Book


Having developed an iOS 9 application the final step is to submit it to Apple’s App Store. Preparing and submitting an application is a multistep process details of which will be covered in this chapter.


Contents


Verifying the iOS Distribution Certificate

The chapter entitled Joining the Apple Developer Program covered the steps involved in generating signing certificates. In that chapter, both a development and distribution certificate were generated. Up until this point in the book, applications have been signed using the development certificate so that testing could be performed on physical iOS devices. Before an application can be submitted to the App Store, however, it must be signed using the distribution certificate. The presence of the distribution certificate may be verified from within the Xcode 7 Preferences settings.

With Xcode 7 running, select the Xcode -> Preferences… menu option and select the Accounts category from the toolbar of the resulting window. Assuming that Apple IDs have been configured as outlined in Joining the Apple Developer Program, a list of one or more Apple IDs will be shown in the accounts panel as illustrated in Figure 105-1:


Image454.png

Figure 105-1


Select the Apple ID to be used to sign the application and click on the View Details button to display the list of signing identities and provisioning profiles associated with that ID:


Xcode 7 signing identities.png

Figure 105-2


Under the Signing Identities heading, check that a valid signing identity is listed for iOS Distribution. If a valid distribution certificate is not listed, click on the corresponding Create button. Xcode will then contact the developer portal and generate and download a new signing certificate suitable for use when signing applications for submission to the App Store. Once the signing identity has been generated, the Create button will disappear from beside the identity name.

Adding App Icons

Before rebuilding the application for distribution it is important to ensure that app icons have been added to the application. The app icons are used to represent your application on the home screen, settings panel and search results on the device. Each of these categories requires a suitable icon in PNG format and formatted for a number of different dimensions. In addition, different variants of the icons will need to be added for retina and non-retina displays and depending on whether the application is for the iPhone or iPad (or both).

Learn SwiftUI and take your iOS Development to the Next Level
SwiftUI Essentials – iOS 16 Edition book is now available in Print ($39.99) and eBook ($29.99) editions. Learn more...

Buy Print Preview Book

App icons are added using the project settings screen of the application project within Xcode. To view these settings, load the project into Xcode and select the application target at the top of the project navigator panel. In the main panel, select the General tab and scroll down to the App Icons and Launch Images sections. By default, Xcode will look for the App icon images within an asset catalog named AppIcon located in the Assets.xcassets asset catalog. Next to the App Icons Source menu is a small arrow (as indicated in Figure 105-3) which, when clicked, will provide access to the asset catalog of the App icons.


Xcode 7 app icon launch options.png

Figure 105-3


When selected, the AppIcon asset catalog screen will display showing placeholders for each icon size:


Xcode 7 app icons.png

Figure 105-4


To add images, simply drag and drop the missing PNG format image files from a Finder window onto the corresponding placeholders in the asset catalog, or Ctrl-click on the catalog and select Import from the menu to import multiple files. At a minimum you will need to add 40 x 40, 76 x 76, 120 x 120 and 152 x 152 PNG icon files in order to pass the archive validate stage.


Designing the Launch Screen

The launch screen contains the content that appears when the application is starting up. The design for this screen is contained in the LaunchScreen.storyboard file which will have been generated automatically during the project creation process.

Load the file into interface Builder and modify it to meet your requirements, including adding any images that may be required and keeping in mind that the layout must use Auto Layout and Size Classes to ensure that the layout appears correctly on all screen sizes. Note also that the layout is limited to UIKit classes and cannot include a UIWebView object.

Assign the Project to a Team

As part of the submission process, the project must be associated with a development team to ensure that the correct signing credentials are used. In the project navigator panel, select the project name to display the project settings panel. Click the General tab and within the Identity section, select a team from the menu as shown in Figure 105-5:


Xcode select team.png

Figure 105-5

Archiving the Application for Distribution

The application must now be rebuilt using the previously installed distribution profile. To generate the archive, select the Xcode Product -> Archive menu option. Note that if the Archive menu is disabled this is most likely because a simulator option is currently selected as the run target in the Xcode toolbar. Changing this menu either to a connected device, or the generic iOS Device target option should enable the Archive option in the Product menu.

Xcode will proceed to archive the application ready for submission. Once the process is complete the archive will be displayed in the Archive window ready for upload and distribution:


Xcode 7 archive window.png

Figure 105-6

Configuring the Application in iTunes Connect

Before an application can be submitted to the App Store for review it must first be configured in iTunes Connect. Enrollment in the Apple Developer program automatically results in the creation of an iTunes Connect account using the same login credentials. iTunes Connect is a portal where developers enter tax and payment information, input details about applications and track the status of those applications in terms of sales and revenues. Access iTunes Connect by navigating to http://itunesconnect.apple.com in a web browser and entering your Apple Developer program login and password details.

First time users should click on the Agreements, Tax, and Banking option and work through the various tasks to accept Apple’s terms and conditions and to input appropriate tax and banking information for the receipt of sales revenue.

Once the administrative tasks are complete, select the My Apps option and click on the + button followed by New iOS App to enter information about the application. Begin by entering a name for the application and an SKU of your own creation. Also select or enter the bundle ID that matches the application that has been prepared for upload in Xcode:


Itunes connect new app.png

Figure 105-7


Once the application has been added it will appear within the My Apps screen listed as Prepare for submission:


Itunes connect prepare for submission.png

Figure 105-8

Learn SwiftUI and take your iOS Development to the Next Level
SwiftUI Essentials – iOS 16 Edition book is now available in Print ($39.99) and eBook ($29.99) editions. Learn more...

Buy Print Preview Book

Validating and Submitting the Application

To validate the application, return to the Xcode archives window, make sure the application archive is selected and click on the Validate… button. Enter your iOS Developer program login credentials when prompted to do so. If more than one signing identity is configured within Xcode, select the desired identity from the menu.

Xcode will connect to the iTunes Connect service, locate the matching app entry added in the previous step and display the summary screen shown in Figure 105-9:


Xcode 7 archive validation summary.png

Figure 105-9


This screen includes access to the list of entitlements used by the app, such as iCloud access or in app purchasing, together with the following two options for selection:

  • Include app symbols – If selected, the Apple will include symbol information for the app. This information, which includes function and method names, source code line numbers and file paths, will be included in the crash logs provided to you by Apple in the event that your app crashes when in use by a customer. Selection of this option is recommended.
  • Include bitcode – Bitcode is a new intermediate binary format introduced with iOS 9. By including the app in bitcode format, it can be compiled by Apple so that it is optimized for the full range of target iOS devices and to take advantage of future hardware and software advances. Selection of this option is recommended.

Click on the Validate button perform a validation check on the archived application. Xcode will create and validate the archive and report any errors identified during the validation process. Correct any reported errors, re-archive the application and validate it again. Repeat these steps until the validation passes:


Archive validation complete.png

Figure 105-10


Click on the Done button to dismiss the panel. The application is now ready to be uploaded for App Store review. Make sure the application archive is still selected and click on the Upload to App Store… button. Enter your developer program login credentials when prompted and review the summary information before clicking on the Submit button. Wait for the upload process to complete at which point a message should appear indicating that the submission was successful:


Xcode 6 submission successful.png

Figure 105-11


105.8 Configuring and Submitting the App for Review On the My Apps screen of the iTunes Connect portal, select the new app entry to display the configuration screen where options are available to set up pre-release test users, designate pricing, enter product descriptions and upload screenshots and preview videos. Once this information has been entered and saved and the app is ready for submission to the App Store, click on the Submit for Review button highlighted in Figure 105 12:


Ios 9 itunes connect submit app.png

Figure 105-12


Once Apple has completed the review process an email will arrive stating whether the application has been accepted or not. In the event that the application has been rejected, reasons for the rejection will be stated and the application may be resubmitted once these issues have been addressed.


Learn SwiftUI and take your iOS Development to the Next Level
SwiftUI Essentials – iOS 16 Edition book is now available in Print ($39.99) and eBook ($29.99) editions. Learn more...

Buy Print Preview Book



PreviousTable of Contents
Recording Audio on iOS 9 with AVAudioRecorder