Chapter 5. Build and Release

The purpose of this chapter is to show you how to prepare and build your app for distribution. We’ve covered the creation of the App ID, certificates, and Provisioning Profiles in earlier chapters; now it’s time to bring everything together and build. We’ll cover several build-specific Xcode settings and then move on to common build scenarios such as building for the iOS Simulator, and building for Ad Hoc & App Store Distribution. Finally, we’ll cover setting up a “record” for your app on the iTunes Connect website and using that record to upload your build for it to be available on the App Store.

Xcode Build Settings

Xcode provides many options to set or add custom configurations for your app. It would be impossible to cover all of them here, and in the interest of getting your app built and ready for distribution, we will only cover the most common settings that pertain to building. For further reading on the various customizations available, see the “Build and Run Your App” section of the Xcode 4 User Guide.

Understanding Xcode Settings

Within the Xcode project editor, you will notice there are many configuration settings that are redundant between project-level and target-level settings. Here are a few pointers that will help you figure out which setting Xcode ultimately utilizes during the build process:

  • Project-level settings are global settings that apply to all targets. Settings at the target level are considered “lower-level” settings and are applicable only to that target. Target-level settings override project-level settings.

  • Any parameters passed during a command line build (using xcodebuild) take precedence over target-level settings.

  • Within the “Build Settings” tab, pressing the Levels button will display the “resolved” setting for each configuration setting. The path used to determine the setting is displayed in decreasing precedence from left to right. The level at which the setting is determined is highlighted in green.

  • Within the project editor, modified settings are displayed in bold. The setting will remain in bold even if you change it back to the default, to give you a visual indicator that it was changed. In the example presented in Figure 5-1, the default ‘Valid Architectures’ setting for the project is ‘armv7 armv7s’. As indicated, the armv6 architecture was added at the target level, yielding a resolved setting of ‘armv7 armv7s armv6’.

Using the Levels display to determine target settings
Figure 5-1. Using the Levels display to determine target settings

App ID Setup

This section details how to properly set the “Bundle identifier” setting in your Xcode project with your App ID from the iOS Provisioning Portal. As discussed in previous chapters, before you distribute your build, it has to be signed by a Development or Distribution Certificate using a Provisioning Profile. As you know by now, Provisioning Profiles (Development or Distribution) are associated to a specific App ID at creation time. In order for your app to be signed, the Bundle ID portion of your App ID has to be correctly entered into the target settings of your app within Xcode. To summarize: you need to set up your Xcode project so that the Provisioning Profile on your computer is valid for the app you are building.

Take a moment to log in to the iOS Provisioning Portal and go to the Provisioning section. For the Development and Distribution Provisioning Profiles associated to the app you are building, make a note of the App ID these profiles are using. The App ID should be the same for both. From there, go to the App IDs section and make a note of the Bundle ID portion of the App ID. We are going to input that Bundle ID into Xcode. If your Bundle ID ends with a wildcard (*) character, you will have to replace the asterisk with a string of your choosing. Use Table 5-1 to help you determine the Bundle ID portion of your App ID. In a nutshell, everything to the right of, but not including, the decimal point after the “Bundle Seed ID” will be used to populate the Xcode “Bundle identifier” setting.

Table 5-1. Determine the “Bundle identifier” Setting for Xcode
Sample App IDBundle ID PortionBundle ID Setting for Xcode
3H569L9349.com.acme.FinancialPlannercom.acme.FinancialPlannercom.acme.FinancialPlanner
7L2O9A2384.pokertournamentpokertournamentpokertournament
4B587C2146.**pokertournament
AW4MH6TPFX.com.acme.*com.acme.*com.acme.mortgageCalc
PSQV8VS4PW.com.tomdeveloper.*com.tomdeveloper.*com.tomdeveloper.fastcars

Setting the Bundle ID

Within Xcode, follow these steps to set the “Bundle identifier” for your app (see Figure 5-2):

  1. Go to View Navigators Show Project Navigator.

  2. Select the root project folder.

  3. Within the project editor, select your target in the TARGETS section.

  4. Select the Info tab.

  5. By default, Xcode sets the Bundle identifier to something similar to com.appname.${PRODUCT_NAME:rfc1034identifier}. Change the “Bundle identifier” setting to match your Bundle ID. This setting is case-sensitive, and make sure there are no extra spaces after the Bundle identifier.

Setting the Bundle Identifier for your app
Figure 5-2. Setting the Bundle Identifier for your app

Verifying the Bundle ID

Follow these steps to verify that the Bundle identifier you have set for your app’s target is correctly associated to your Provisioning Profile(s) (see Figure 5-3):

  1. Select your target, and go to the “Build Settings” tab.

  2. Verify the view settings are set to All and Combined.

  3. Within the Code Signing section, expand all settings for all build configurations by pressing the gray triangle to the left of “Code Signing Identity”. If the Bundle identifier matches the App ID associated to the Provisioning Profile, you will be able to set your “Any iOS SDK” to the respective Provisioning Profile. By default, Xcode sets the “Any iOS SDK” (for both default Debug and Release build configurations) to the Development Provisioning Profile.

    • For the Debug build configuration, the “Any iOS SDK” setting will be set to ‘iPhone Developer (currently matches “iPhone Developer: Development_Certificate_Name in Development_Provisioning_Profile_Name”),’ which indicates that the “Bundle identifier” you have specified for your app matches the installed Development Provisioning Profile.

    • For the Release build configuration, your Distribution Provisioning Profiles can be verified to work with your app’s Bundle identifier setting by successfully changing the Code Signing Identity Release Any iOS SDK setting to either your Ad Hoc or App Store Distribution Provisioning Profile. The setting will then be in the form of “iPhone Distribution: Distribution_Certificate_Name”. Choosing the “iPhone Distribution” profile within “Automatic Profile Selector” will also select a Distribution Provisioning Profile, and change the setting to ‘iPhone Distribution (currently matches “iPhone Distribution...”)'.

Note

If you install a Provisioning Profile while Xcode is open, you may be wondering why the Xcode project editor doesn’t “see” your new profile but Organizer does? Try toggling back and forth between your project and target to refresh the view, or restart Xcode.

The Bundle ID matches the Provisioning Profiles
Figure 5-3. The Bundle ID matches the Provisioning Profiles

Setting the Base SDK

Xcode allows you to set the version of the SDK it will use to compile your app. It is a best practice to use the Latest SDK setting to build your app for optimal performance, as the latest SDK version always has the most updated libraries, frameworks, integrated compilers, and so on. Unless you have a very specific reason not to use Latest SDK, verify this setting at both the project and target levels of your app.

To set the Base SDK at the project level (see Figure 5-4):

  1. Go to View Navigators Show Project Navigator.

  2. Select the root project folder.

  3. Within the project editor, select your project.

  4. Select the “Build Settings” tab and within the Architectures section, set “Base SDK” to “Latest iOS (version)”.

Setting the Base SDK for the project
Figure 5-4. Setting the Base SDK for the project

For each target within your app, set the Base SDK (see Figure 5-5):

  1. Go to View Navigators Show Project Navigator.

  2. Select the root project folder.

  3. Within the project editor, select your target.

  4. Select the Build Settings tab and within the Architectures section, set “Base SDK” to “Latest iOS (version)”.

Setting the Base SDK for the target
Figure 5-5. Setting the Base SDK for the target

Setting the Deployment Target

At some point during the development cycle, you should determine the lowest version of iOS device software your app is going to run on. This decision could be driven by an API your app utilizes that isn’t available in earlier versions of iOS, or a hardware requirement that isn’t available on devices with older versions of iOS. The “Deployment Target” setting will be reflected as the minimum iOS software version required for your app to customers on the App Store. For example, if you designate a Deployment Target setting of 5.1, your app will be noted on the App Store as “Requires iOS 5.1 or later.” If a user attempts to install your app onto a device running an iOS version lower than 5.1, she will receive an “Application Not Compatible” error message. Keep in mind that the higher the iOS version your deployment target is set to, the fewer customers will be able to run your app; you will be excluding those customers from installing your app because they are running an older version of iOS on their device.

Follow these steps to set the iOS Deployment Target for your app’s target settings:

  1. Go to View Navigators Show Project Navigator.

  2. Select the root project folder.

  3. Within the project editor, select your target.

  4. Select the Summary tab, use the drop-down selector to set the Deployment Target.

  5. Set the Deployment Target for each target within your project or workspace (see Figure 5-6).

Setting the iOS Deployment Target for the target
Figure 5-6. Setting the iOS Deployment Target for the target

Targeting Specific Hardware Architectures

Setting the Deployment Target iOS version for your app has a direct impact on the hardware architecture settings. As of Xcode 4.5, the default hardware architecture is set to ‘armv7 armv7s’. Older devices such as the iPhone3G and the 2nd generation iPod touch have the armv6 hardware architecture. If your app has an iOS Deployment Target of 4.2 or less, you’ll have to add the armv6 architecture to accommodate devices with the armv6 architecture. Pragmatically speaking, if your iOS Deployment Target is set to 4.0, but you have not added the armv6 architecture, you will not be able to install your app on an iPhone3G or a 2nd generation iPod touch, both of which may be running iOS 4.2.1. Inversely, you may have a project in which you no longer support an iOS version less than or equal to 4.3, so you may use this methodology to remove the armv6 hardware architecture setting.

To explain how to add an additional hardware architecture to your app’s target, we’ll walk through adding the armv6 hardware architecture to an Xcode 4.5 target. Additionally, you’ll need to add the armv6 hardware architecture to the target setting of each third-party library your app utilizes:

  1. Go to View Navigators Show Project Navigator.

  2. Select the root project folder.

  3. Within the project editor, select your target.

  4. Select the Build Settings tab.

  5. The default Architectures setting for Xcode 4.5 is by default set to “Standard (armv7 armv7s) - $(ARCHS_STANDARD_32_BIT)”.

  6. Select the Architectures setting, and choose Other to modify this setting (see Figure 5-7).

    Adding Other hardware architectures
    Figure 5-7. Adding Other hardware architectures
  7. Select $(ARCHS_STANDARD_32_BIT), and use the minus (-) button to remove it. Use the add (+) button to add armv7s, armv7, and armv6 (see Figure 5-8).

    Adding additional hardware architectures
    Figure 5-8. Adding additional hardware architectures
  8. Verify that the “Build Active Architecture Only” setting is set to No.

Caution

If you don’t add the armv6 architecture to your target settings, and your deployment target is lower than 4.3, you will receive the following error message when you attempt to upload your app to iTunes Connect: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6.

Build Configurations

By default, all new Xcode projects are created with the Default and Release build configurations. You may encounter a scenario in which you wish to add another build configuration for your project. Example use cases for doing this may be: you wish to build your app with a different bundle id, you may want to use a different provisioning profile to access the keychain, etc.

Follow these steps to add an additional build configuration to your project:

  1. Go to View Navigators Show Project Navigator.

  2. Select the root project folder.

  3. Within the project editor, select your project.

  4. Select the Info tab, go to the Configurations section and press the '+' button to duplicate an existing build configuration to be used as a starting point (see Figure 5-9).

  5. Set a name for your new build configuration. The configuration options within Build Settings for your project and target(s) will now include your additional build configuration.

Adding a new build configuration
Figure 5-9. Adding a new build configuration

Icons and Launch Images

Apps deployed to the App Store have to fulfill specific requirements when it comes to icons and launch image(s). Besides the main application icon used to represent your app on the GUI of an iOS device, your app is represented in other places within iOS (such as the results of Spotlight search) which would require an additional, smaller icon. Launch images are displayed briefly while your app loads into memory, in order to give the user immediate feedback. Use this section to understand which icons and launch images are required, and which are optional. As a best practice, you should add all the optional icons as well, for your app to look as professional as possible.

Here are a few pointers that apply to icons and launch images:

  • All icon and launch image files must be at the top-level of your application bundle and in PNG format.

  • Icons are listed in the CFBundleIconFiles key within the targets AppName-Info.plist file. Filename extensions are not required, as the device will figure out which icon to display. However if you decide to list a filename with an extension, make sure all icon filenames have extensions.

  • If you wish to use a base filename other than Default, specify a value using the UILaunchImageFile key within the AppName-Info.plist file of your app. For instance, specify a key of AppLaunchImage to name your launch images AppLaunchImage-Portrait.png and AppLaunchImage-Landscape.png. Without this key, iOS assumes you are using the Default launch image base filenames such as Default.png, Default-Portrait.png, Default-Landscape.png, etc.

  • Icons designated to support Retina displays will be in the filename@2x.png format.

  • Icons designated to support non-Retina displays will be in the filename.png format.

For more information on Launch images and app icons, refer to the Custom Icon and Image Creation Guidelines section of the iOS Human Interface Guidelines:

http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html%23//apple_ref/doc/uid/TP40006556-CH14-SW1

iPad icons and images

Review the following list regarding app icons and launch images for an iPad-only app (see Table 5-2):

Application Icons (required)

An iPad app requires both a 144 x 144 pixels, and a 72 × 72 pixels application icon (the main icon for your app as it is displayed on the iPad interface). The 144 x 144 pixels image is used by Retina displays only.

Settings Icons (optional)

If your app has a Settings bundle, include both a 58 × 58 pixels, and a 29 × 29 pixels icon. The 58 x 58 pixels image is used by Retina displays only.

Spotlight Search Results Icons (recommended)

Not required, but to keep your app looking professional, include both a 100 × 100 pixels, and a 50 x 50 pixels icon for use in Spotlight search results. The 100 x 100 pixels image is used by Retina displays only.

Launch Images (required)

At least one launch image is required for iPad apps. However, you should include launch images that support the different orientations of your app. Do not include the status bar region in your launch image. Portrait-oriented launch images for iPad apps are: 1563 × 2008 pixels (for Retina displays), and 768 × 1004 pixels (for non-Retina displays). If your app supports landscape orientation, landscape-oriented launch images for iPad apps are 2048 × 1496 pixels (for Retina displays), and 1024 × 748 pixels (for non-Retina displays). Use the Default base filename for the different launch images such as [email protected], Default-Portrait.png, [email protected], and Default-Landscape.png. If you do not use the Default base filename for the launch images, you will have to add the UILaunchImageFile key to the AppName-Info.plist file.

Table 5-2. iPad-only app image checklist
TypeOrientationDimensionsExample FilenameRetina Display Type
Application Iconn/a144 x 144pxAppName[email protected]
Application Iconn/a72 x 72pxAppName-icon.pngNo
Settings Iconn/a58 x 58pxAppName[email protected]
Settings Iconn/a29 x 29pxAppName-icon-29.pngNo
Spotlight Search Results Iconn/a100 x 100pxAppName[email protected]
Spotlight Search Results Iconn/a50 x 50pxAppName-icon-50.pngNo
Launch ImagePortrait1536 x 2008pxDefault-Portrait@2x~ipad.png
Launch ImagePortrait768 x 1004pxDefault-Portrait~ipad.pngNo
Launch ImageLandscape2048 x 1496pxDefault-Landscape@2x~ipad.png
Launch ImageLandscape1024 x 748pxDefault-Landscape~ipad.pngNo

The following is a code snippet from a sample AppName-Info.plist file which shows how icons and a custom launch image base filename can be defined for an iPad-only app:

<key>CFBundleIcons</key>
<dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
                <key>CFBundleIconFiles</key>
                <array>
                        <string>[email protected]</string> 1
                        <string>nextgreatapp-icon.png</string> 2
                        <string>[email protected]</string> 3
                        <string>nextgreatapp-icon-29.png</string> 4
                        <string>[email protected]</string> 5
                        <string>nextgreatapp-icon-50.png</string> 6
                </array>
        </dict>
</dict>
<key>UILaunchImageFile</key> 7
<key>CustomLaunchImage</key> 8
1

The required 144 x 144 pixels iPad application icon (Retina display only).

2

The required 72 x 72 pixels iPad application icon (non-Retina display).

3

An optional 58 x 58 pixels iPad Settings bundle icon (Retina display only).

4

An optional 29 x 29 pixels iPad Settings bundle icon (non-Retina display).

5

A recommended 100 x 100 pixels iPad Spotlight Search results icon (Retina display only).

6

A recommended 50 x 50 pixels iPad Spotlight Search results icon (non-Retina display).

7

In this example, we are not using the Default base filename for our launch images, so we are adding the UILaunchImageFile key and defining the base filename on the next line. There is no need to specify this key (or the next line of course!) if you are using Default for your base filename; your filenames are Default-Landscape.png, Default-Portrait.png, etc.

8

In this example, because CustomLaunchImage has been defined as the image base filename for our iPad app, the launch image files would have names such as [email protected], CustomLaunchImage-Portrait.png, [email protected], CustomLaunchImage-Landscape.png, etc.

iPhone/iPod touch icons and images

Review the following list regarding app icons and launch images for an iPhone / iPod touch app. You’ll notice the list is a bit more complex than the list for an iPad-only app as an iPhone/iPod touch app can also run on the iPad, which results in providing additional icons (see Table 5-3):

Application Icons (required)

An iPhone / iPod touch app requires both a 114 x 114 pixels, and a 57 × 57 pixels application icon (the main icon for your app as it is displayed on the iPhone & iPod touch interfaces). The 114 x 114 pixels image is used by Retina displays only.

Additional Application Icons (optional)

Since your iPhone / iPod touch app may run on the iPad, optionally you can include both a 144 x 144 pixels, and a 72 × 72 pixels application icon for the main iPad app icon. The 144 x 144 pixels image is used by Retina displays only.

Settings Icons (optional)

If your app has a Settings bundle, include both a 58 × 58 pixels, and a 29 × 29 pixels icon. The 58 x 58 pixels image is used by Retina displays only. Since your iPhone / iPod touch app will run on the iPad, the iPad will also use these icons for its Settings bundle.

Spotlight Search Results Icons (recommended)

An iPhone / iPod touch app uses the same icon for both Spotlight search results and the Settings bundle; use the guidelines in the bullet point above for Settings Icons to add a Spotlight search result icon. Since your iPhone / iPod touch app will run on the iPad, optionally you can include both a 100 × 100 pixels, and a 50 x 50 pixels icon for use in Spotlight search results on the iPad. The 100 x 100 pixels image is used by Retina displays only.

Launch Images (required)

For an iPhone / iPod touch app, only one portrait-oriented launch image is required (landscape-oriented launch images are not used with iPhone / iPod touch apps). However you should include different sizes of that one launch image; multiple files of the same image with different dimensions. Include the status bar region in your launch image. Launch image sizes are: 640 x 1136 pixels (Retina 4-inch), 640 × 960 pixels (Retina 3.5-inch), and 320 x 480 pixels (non-Retina 3.5-inch). Use the Default base filename for the different launch image sizes respectively: [email protected], [email protected] and Default.png. If you do not use the Default base filename for the launch images, you will have to add the UILaunchImageFile key to the AppName-Info.plist file.

Table 5-3. iPhone / iPod touch app image checklist
TypeOrientationDimensionsExample FilenameRetina Display Type
Application Iconn/a114 x 114pxAppName[email protected]
Application Iconn/a57 x 57pxAppName-icon.pngNo
Application Iconn/a144 x 144pxAppName[email protected]
Application Iconn/a72 x 72pxAppName-icon-72.pngNo
Settings / Spotlight Search Results Iconn/a58 x 58pxAppName[email protected]
Settings / Spotlight Search Results Iconn/a29 x 29pxAppName-icon-29.pngNo
iPad Spotlight Search Results Iconn/a100 x 100pxAppName[email protected]
iPad Spotlight Search Results Iconn/a50 x 50pxAppName-icon-50.pngNo
Launch ImagePortrait640 x 1136px[email protected]
Launch ImagePortrait640 x 960px[email protected]
Launch ImagePortrait320 x 480pxDefault.pngNo

The following is a code snippet from an AppName-Info.plist file which shows how icons and a custom launch image base filename can be defined for an iPhone / iPod touch app:

<key>CFBundleIcons</key>
<dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
                <key>CFBundleIconFiles</key>
                <array>
                        <string>[email protected]</string> 1
                        <string>nextgreatapp-icon.png</string> 2
                        <string>[email protected]</string> 3
                        <string>nextgreatapp-icon-72.png</string> 4
                        <string>[email protected]</string> 5
                        <string>nextgreatapp-icon-29.png</string> 6
                        <string>[email protected]</string> 7
                        <string>nextgreatapp-icon-50.png</string> 8
                </array>
        </dict>
</dict>
<key>UILaunchImageFile</key> 9
<key>CustomLaunchImage</key> 10
1

The required 114 x 114 pixels iPhone / iPod touch application icon (Retina display only).

2

The required 57 x 57 pixels iPhone / iPod touch application icon (non-Retina display).

3

An optional 144 x 144 pixels iPad application icon (Retina display only).

4

An optional 72 x 72 pixels iPad application icon (non-Retina display).

5

A recommended 58 x 58 pixels Settings bundle and Spotlight Search results icon (Retina display only). This icon will also be used on the Retina display iPad for its Settings bundle.

6

A recommended 29 x 29 pixels Settings bundle and Spotlight Search results icon (non-Retina display). This icon will also be used on the non-Retina display iPad for its Settings bundle.

7

A recommended 100 x 100 pixels iPad Spotlight Search results icon (Retina display only).

8

A recommended 50 x 50 pixels iPad Spotlight Search results icon (non-Retina display).

9

In this example, we are not using the Default base filename for our launch images, so we are adding the UILaunchImageFile key and defining the base filename on the next line. There is no need to specify this key (or the next line of course!) if you are using Default for your base filename; your filenames are [email protected], [email protected] and Default.png.

10

In this example, because CustomLaunchImage has been defined as the image base filename for our iPhone / iPod touch app, the launch image files would have names such as [email protected], [email protected] and CustomLaunchImage.png.

Icons and images for Universal Apps

Review the following list for information on app icons and launch images for universal applications (see Table 5-4):

Application Icons (required)

For universal applications, all 4 sizes of your application icon are required: 144 x 144 pixels (for Retina displays), 72 × 72 pixels, 114 x 114 pixels (for Retina displays), and 57 × 57 pixels.

Settings Icons (optional)

If your app has a Settings bundle, include both a 58 × 58 pixels (for iPad, iPhone, iPod touch Retina displays), and a 29 × 29 pixels (for iPad, iPhone, iPod touch non-Retina displays) icon.

Spotlight Search Results Icons (recommended)

For the Spotlight Search results icons in a universal app, include the images listed above for Settings icons, and additionally include both a 100 × 100 pixels (for Retina displays), and a 50 x 50 pixels icon for use in Spotlight search results on the iPad.

Launch Images

For a universal app, you must provide launch images for both the iPad and the iPhone / iPod touch. For the iPhone / iPod touch launch image, only one portrait-oriented launch image is required (landscape-oriented launch images are not used with iPhone / iPod touch apps). However you should include different sizes of that one launch image; multiple files of the same image with different dimensions. Include the status bar region in your launch image. Launch image sizes are: 640 x 1136 pixels (Retina 4-inch), 640 × 960 pixels (Retina 3.5-inch), and 320 x 480 pixels (non-Retina 3.5-inch). Use the Default base filename for the different launch image sizes respectively: [email protected], [email protected] and Default.png (see Table 5-4).

At least one iPad launch image is required for a universal app. However, you should include launch images that support the different orientations of your app for the iPad. Do not include the status bar region in your launch image. Portrait-oriented launch images for iPad apps are: 1563 × 2008 pixels (for Retina displays), and 768 × 1004 pixels (non-Retina displays). If your app supports landscape orientation, landscape-oriented launch images for iPad apps are 2048 × 1496 pixels (for Retina displays), and 1024 × 748 pixels (for non-Retina displays). Use the Default base filename with the '~ipad’ device modifier for the different launch images such as Default-Portrait@2x~ipad.png, Default-Portrait~ipad.png, Default-Landscape@2x~ipad.png, and Default-Landscape~ipad.png (see Table 5-4).

If you do not use the Default base filename for the launch images, add both the UILaunchImageFile and the UILaunchImageFile~ipad keys to your app’s AppName-Info.plist file.

Table 5-4. Universal app image checklist
TypeOrientationDimensionsExample FilenameRetina Display Type
iPad Application Iconn/a144 x 144pxAppName[email protected]
iPad Application Iconn/a72 x 72pxAppName-icon-72.pngNo
iPhone/ iPod touch Application Iconn/a114 x 114pxAppName[email protected]
iPhone / iPod touch Application Iconn/a57 x 57pxAppName-icon-57.pngNo
Settings / Spotlight Search Results Iconn/a58 x 58pxAppName[email protected]
Settings / Spotlight Search Results Iconn/a29 x 29pxAppName-icon-29.pngNo
iPad Spotlight Search Results Iconn/a100 x 100pxAppName[email protected]
iPad Spotlight Search Results Iconn/a50 x 50pxAppName-icon-50.pngNo
Launch Image iPhone / iPod touchPortrait640 x 1136px[email protected]✓ (Retina 4-inch)
Launch Image iPhone / iPod touchPortrait640 × 960px[email protected]✓ (Retina 3.5-inch)
Launch Image iPhone / iPod touchPortrait320 x 480pxiPhoneImage.pngNo (non-Retina 3.5-inch)
Launch Image iPadPortrait1536 x 2008pxiPadImage-Portrait@2x~ipad.png
Launch Image iPadPortrait768 x 1004pxiPadImage-Portrait~ipad.pngNo
Launch Image iPadLandscape2048 x 1496pxiPadImage-Landscape@2x~ipad.png
Launch Image iPadLandscape1024 x 748pxiPadImage-Landscape~ipad.pngNo

The following is a code snippet from an AppName-Info.plist file which shows how icons and a custom launch image base filename can be defined for a universal app:

<key>CFBundleIcons</key>
<dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
                <key>CFBundleIconFiles</key>
                <array>
                        <string>[email protected]</string> 1
                        <string>nextgreatapp-icon-72.png</string> 2
                        <string>[email protected]</string> 3
                        <string>nextgreatapp-icon-57.png</string> 4
                        <string>[email protected]</string> 5
                        <string>nextgreatapp-icon-29.png</string> 6
                        <string>[email protected]</string> 7
                        <string>nextgreatapp-icon-50.png</string> 8
                </array>
        </dict>
</dict> 
<key>UILaunchImageFile~ipad</key>  9
<string>iPadImage</string> 10
<key>UILaunchImageFile</key> 11
<string>iPhoneImage</string> 12
1

The required 144 x 144 pixels iPad application icon (Retina display only).

2

The required 72 x 72 pixels iPad application icon (non-Retina display).

3

The required 114 x 114 pixels iPhone / iPod touch application icon (Retina display only).

4

The required 57 x 57 pixels iPhone / iPod touch application icon (non-Retina display).

5

An optional 58 x 58 pixels iPhone / iPod touch Settings bundle and Spotlight Search results icon (Retina display only). This icon will also be used on the Retina display iPad for its Settings bundle.

6

The 29 x 29 pixels iPhone / iPod touch Settings bundle and Spotlight Search results icon (non-Retina display). This icon will also be used on the non-Retina display iPad for its Settings bundle.

7

An optional 100 x 100 pixels iPad Spotlight Search results icon (Retina display only).

8

An optional 50 x 50 pixels iPad Spotlight Search results icon (non-Retina display).

9

In this example we are specifying the UILaunchImageFile~ipad key in order to define a specific base filename for iPad launch images. The base filename will be defined on the next line.

10

In this example, because iPadImage has been defined as the base filename for our iPad launch images, the launch image files would have names such as such as [email protected], iPadImage-Portrait.png, [email protected], iPadImage-Landscape.png, etc.

11

In this example we are specifying the UILaunchImageFile key in order to define a specific base filename for iPhone / iPod touch launch images. The base filename will be defined on the next line.

12

In this example, because iPhoneImage has been defined as the base filename for our iPhone / iPod touch launch images, the launch image files would have names such as [email protected], [email protected], iPhoneImage.png, etc.

Build Scenarios

In this section, we will cover the most common build scenarios you will encounter during the development and testing cycles for an iOS app. For each build scenario, a list of “pre-build” bullet points can be used as a guide to help you avoid build and code signing errors.

Using the iOS Simulator

During the development phase of an iOS app, building and running your app on the iOS Simulator is the fastest way to verify that your app builds and loads without error. Here are few tips regarding the iOS Simulator:

  • The iOS Simulator can be opened from Xcode by selecting Xcode → Open Developer Tool → iOS Simulator.

  • The iOS Simulator stores the apps you deploy to it within the ~/Library/Application Support/iPhone Simulator/iOS-version/Applications directory.

  • To reset the iOS Simulator back to the default settings (along with removing any apps you may have installed), select iOS Simulator “Reset Content and Settings...”

  • Several older iOS Simulator software versions that are missing from your iOS Simulator can be downloaded by going to Xcode Preferences Downloads tab Components. The versions of iOS Simulator available for download are based on your version of Xcode; older versions of the iOS Simulator may not be available. You will be prompted for your Apple Developer ID to download and install older versions of the iOS Simulator. An Apple Developer ID can be created on the Apple Developer Registration website.

iOS Simulator Build

In the upper-left corner of the workspace window, set the run destination to be your choice of Simulator device hardware and iOS version. Press the Run button to compile your app (see Figure 5-10). Upon successful build, the iOS Simulator opens and your app will be loaded into the interface.

Setting the Run Destination to the iOS Simulator and running the build
Figure 5-10. Setting the Run Destination to the iOS Simulator and running the build

Building and Deploying to an iOS Device Using Xcode

This section covers a typical “development” build scenario in which your app is compiled and deployed by Xcode to your iOS device, which is connected locally to your computer by the USB cable. Use the following bullet points as a pre-build checklist to verify your environment is set up properly.

Device Setup

  • Your device is connected to your Mac via the USB port.

  • The device has been added to the Devices List on the iOS Provisioning Portal.

  • The Development Provisioning Profile has the device associated to it.

  • The device has been set up to “Use for Development” (see Device Provisioning Using Xcode Organizer).

Warning

If your device has not yet been configured for development, make sure you press the “Use for Development” button in Xcode Organizer to set up the device for development, or you will receive the following error message when Xcode attempts to deploy your app to the device: Xcode cannot run using the selected device. No provisioning iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.

Certificate and Provisioning Profile Setup

  • Your Development Certificate has been downloaded from the iOS Provisioning Portal and installed into your default (login) keychain. The Development Certificate is associated to a private key (see Verifying the Development Certificate).

  • Within the iOS Provisioning Portal, the Development Provisioning Profile that you are using to sign your app is associated with the Development Certificate that is installed into your default (login) keychain under Certificates. The profile is also associated to the App ID of which the Bundle ID portion of that App ID is set as the “Bundle identifier” for your target (see App ID Setup).

  • The Development Provisioning Profile has been installed onto your computer (see Development Provisioning Profile Setup).

Xcode Build Settings

  • Within the target settings of your app, you have set the “Bundle identifier” to match the Bundle ID portion of your App ID (see App ID Setup). Hint: Find this setting under target Info → Bundle identifier.

  • The “Base SDK” for both your project and target(s) is set to “Latest iOS (version).” Hint: Find both of these settings under Build Settings → Base SDK for both the project and target..

  • The “Deployment Target” for your target is set to an iOS version equal to or less than the iOS version installed on the device you are deploying to.

  • For the target settings of your app, go to Build Settings Code Signing Identity Debug Any iOS SDK and then select the “iPhone Developer: Development_Certificate_Name” (which is listed directly under the (grayed-out) name of your Development Provisioning Profile).

  • Targets for third-party or static libraries do not need to be code signed; set the “Any iOS SDK” value for all static libraries to “Don’t Code Sign.”

Development Build

Follow these steps to build and deploy your app to a locally connected device:

  1. Press the Scheme menu button in the upper left corner of the Xcode toolbar. Using the pop-up menu, choose “Edit Scheme” (see Figure 5-11).

    Using the Scheme Pop-up menu to modify a scheme
    Figure 5-11. Using the Scheme Pop-up menu to modify a scheme
  2. For the Debug task, verify the “Build Configuration” is set to Debug (see Figure 5-12). Press OK to close the scheme editor.

    For a Development build, set the Build Configuration to “Debug”
    Figure 5-12. For a Development build, set the Build Configuration to “Debug”
  3. In the upper-left corner of the workspace window, set the run destination for the Scheme menu to your device, for example: iPhone. Press the Run button to initiate the build (see Figure 5-13).

  4. Your app will install to your device and open.

Verify that the run destination is set to your device and run the build
Figure 5-13. Verify that the run destination is set to your device and run the build

Tip

The first time Xcode attempts to sign your app using your Development Certificate, you will be prompted by Xcode for permission to access to the keychain. Choose the Always Allow button (unless you wish to be prompted by Xcode to access the keychain every time you do a development build).

Warning

If your build fails with a CSSMERR_TP_NOT_TRUSTED error, you do not have an Apple WWDR certificate installed within the keychain your build process is using (see Adding the Apple WWDR Certificate).

Building for Ad Hoc Distribution

This section covers how to build your app for Ad Hoc Distribution, which is the process of creating an application archive that can then be distributed to other users to install onto their (provisioned) devices for testing. This is the type of build you would do for users who will not be using Xcode to install your app onto their device(s). For Ad Hoc Distribution, you will build and package your app into an application archive (AppName.ipa file). Use the following bullet points as a pre-build checklist to verify your environment is set up properly.

Device Setup

  • Unplug any devices connected to the USB port.

Certificate and Provisioning Profile Setup

  • Your Distribution Certificate has been downloaded from the iOS Provisioning Portal and installed into your default (login) keychain. The Distribution Certificate is associated to a private key (see Verifying the Distribution Certificate).

  • On the iOS Provisioning Portal, the Ad Hoc Distribution Provisioning Profile that you are using to sign your app is associated to the Distribution Certificate that is installed into your default keychain within the ‘My Certificates’ category. This profile is also associated to the App ID of which the Bundle ID portion of that App ID is set as the “Bundle identifier” for your apps target (see App ID Setup).

  • The Ad Hoc Distribution Provisioning Profile has been installed onto your computer (see Ad Hoc Distribution Provisioning Profile Setup).

Xcode Build Settings

  • Within the target settings of your app, you have set the “Bundle identifier” to match the Bundle ID portion of your App ID (see App ID Setup). Hint: Find this setting under target Info.

  • The Base SDK for your target(s) is set to “Latest iOS (version)”. Hint: Find this setting under target Build Settings.

  • For the target of your app, go to Build Settings Code Signing Identity Release “Any iOS SDK”, and then select the “iPhone Distribution: Distribution_Certificate_Name” (which is listed directly under the name of your Ad Hoc Distribution Provisioning Profile).

  • Targets for third-party or static libraries do not need to be code signed; set the “Any iOS SDK” value for all static libraries to “Don’t Code Sign.”

  • If your app uses third-party or static libraries, which are added as additional targets, for each library target, verify that within the Deployment section, Skip Install is set to Yes for the Release build configuration.

  • The “iOS Deployment Target” for your project is set to the lowest supported iOS version for your app. Hint: Find this setting under project Info.

  • The “Deployment Target” for your target is set to the lowest supported iOS version for your app. Hint: Find this setting under target Summary.

  • Optionally you can include a 512 × 512 pixels icon file entitled iTunesArtwork (no file extension) at the root of your project. This file is used only for Ad Hoc Distribution and used when your app is loaded into iTunes, as opposed to having an empty icon (see Figure 5-20).

Building for Ad Hoc Distribution

Follow these steps to build your app for Ad Hoc Distribution:

  1. Press the Scheme menu button in the upper left corner of the Xcode toolbar, using the pop-up menu choose “Edit Scheme” (see Figure 5-11).

  2. For the Archive task, set the “Build Configuration” to Release, and verify that “Reveal Archive in Organizer” is selected (see Figure 5-14). Press OK to close the scheme editor.

  3. In the upper-left corner of the workspace window, set the run destination for the Scheme menu to “iOS Device” (see Figure 5-15). This may be a bit non-intuitive, as you should not have an iOS Device connected to your computer at this point. Hint: The Product Archive menu option will be grayed-out if you have any of the Simulator choices set as the run destination target.

  4. Select the Product menu Archive to build your app. When the build is complete, Organizer will open and the application archive will be listed within in the Archives tab (see Figure 5-16).

Note

If you have a need to distribute a Development build (which includes debug symbols), set the Build Configuration for the Archive task to Debug.

For an Archive build, set the Build Configuration to “Release”
Figure 5-14. For an Archive build, set the Build Configuration to “Release”
Verify the build destination and run the build
Figure 5-15. Verify the build destination and run the build
An archived Build within Organizer
Figure 5-16. An archived Build within Organizer

Packaging for Ad Hoc Distribution

Follow these steps to package your app for Ad Hoc Distribution:

  1. Within Organizer Archives tab, highlight the application archive you wish to distribute, and press the “Distribute...” button (see Figure 5-17).

  2. For the “Select the method of distribution:” dialog box, choose “Save for Enterprise or Ad-Hoc Deployment” (see Figure 5-18) and press Next.

  3. For the “Choose an identity to sign with:” dialog box, select your Distribution signing certificate (see Figure 5-18) and press Next.

  4. Save the archive file to your Desktop. You now have an application archive (AppName.ipa file) that can be distributed to users (see Ad Hoc Build Distribution).

Share your build archive for Ad Hoc Distribution
Figure 5-17. Share your build archive for Ad Hoc Distribution
Ad Hoc Distribution packaging options
Figure 5-18. Ad Hoc Distribution packaging options
Ad Hoc Distribution signing options
Figure 5-19. Ad Hoc Distribution signing options

Ad Hoc Build Distribution

Ad Hoc builds of your app can be installed onto iOS devices by syncing the app through iTunes, installing with iPhone Configuration Utility, or using Wireless Distribution. Wireless Distribution (aka over-the-air distribution) allows users to download and install the app from an internal website that is accessed by using a web browser app on their iOS device.

A few pointers on Ad Hoc Distribution:

  • Verify that the target iOS device has been added to your Devices List (see iOS Device Provisioning).

  • If the Ad Hoc Distribution Provisioning Profile already had the target device associated to it when it was downloaded and installed into Xcode Organizer prior to the application archive being created, the profile will be “bundled” into the .ipa file, so the Provisioning Profile will not have to be installed onto the device prior to the app being installed. When the app is loaded onto the device, the profile will be installed along with it.

  • If the Ad Hoc Distribution Provisioning Profile did not have the target device associated to it prior to the archive being created, you will have to add the target device to the profile, download the Ad Hoc Distribution Provisioning Profile, and install it onto the device prior to loading your app onto the device (see Installing Provisioning Profiles onto iOS Devices).

Installing an Ad Hoc Build Using iTunes

Follow these steps to install an Ad Hoc application archive (.ipa) file onto a device using iTunes:

  1. Open iTunes.

  2. Select the File menu “Add to Library...” Navigate to the AppName.ipa file and press Open. The app will be loaded into the Apps view within iTunes (see Figure 5-20).

  3. Within iTunes, select your device and go to the Apps view. Press the Install button next to your app to change the status to ‘Will Install’. Press Apply to load the app onto your device (see Figure 5-21).

An Ad Hoc build loaded into iTunes
Figure 5-20. An Ad Hoc build loaded into iTunes
App settings for an iOS device
Figure 5-21. App settings for an iOS device

Tip

If you attempt to install an Ad Hoc build onto a device in which the Distribution Certificate/Ad Doc Distribution Provisioning Profile used to sign the archive has since expired, you will receive the following error message: A valid provisioning profile for this executable was not found. One way around this is to set the system date of the device (Settings General Date & Time) prior to the time of expiration. The date of expiration is listed within the Payload/AppName.app/embedded.mobileprovision file, which you can view once you unzip the .ipa file. Alternatively, you could just re-build your app with an updated, unexpired Ad Hoc Provisioning Profile.

Installing an Ad Hoc Build Using iPhone Configuration Utility

Follow these steps to install an Ad Hoc application archive (.ipa) file onto a device using iPhone Configuration Utility:

Tip

iPhone Configuration Utility 3.x can be downloaded from http://support.apple.com/kb/DL1465 (for Mac OS X) or http://support.apple.com/kb/DL1466 (for Windows).

  1. Open iPhone Configuration Utility.

  2. Select Applications in the LIBRARY category and press the Add button in the upper-left corner. Browse to your AppName.ipa file and press Open to add it to the list of Applications.

  3. Connect your device to your computer using the USB cable.

  4. Select your device in the DEVICES category, and choose the Applications tab. Press the Install button for the app(s) you wish to install onto the device (see Figure 5-22).

Installing an Ad Hoc build using iPhone Configuration Utility
Figure 5-22. Installing an Ad Hoc build using iPhone Configuration Utility

Ad Hoc Distribution Using an Internal Website

Testers can also install your app directly from a website by clicking on a link using a web browser app from their iOS device. Although this process is sometimes referred to as “Enterprise Distribution,” you do not need to be part of the iOS Enterprise Developer Program to distribute an Ad Hoc build wirelessly. A common workflow would be to send testers an email with a link to an internal website. From there they would use the link to open up the web browser to a URL from which they can load the app onto their device.

At a high level, here are the steps required for Wireless Ad Hoc Distribution:

  • Your project must be archived and saved for “Enterprise Deployment,” which includes the generation of a manifest (.plist) file.

  • Your web server and network must be configured properly (see Web Server Configuration).

  • The application archive (.ipa) and (.plist) files will be copied to a directory on your web server, which is accessible to your users.

  • Set up a web page that includes a link to the manifest (.plist) file.

  • The target iOS device(s) has been added to your Devices List (see iOS Device Provisioning). The iOS device must also be associated to the Ad Hoc Distribution Provisioning Profile that is bundled with the application archive (see Ad Hoc Distribution Provisioning Profile Setup).

Web Server Configuration

Your web server must have the ipa and plist MIME types added to its configuration so that the files can be properly interpreted. Be sure to restart your web server after the configuration change.

Here is an example of adding the MIME types to an Apache web server’s configuration file:

application/octet-stream ipa
text/xml plist

For an IIS web server, here is an example configuration to add the MIME types:

.ipa application/octet-stream
.plist text/xml

Network Configuration

According to Apple’s documentation, iOS devices must be able to reach both ax.init.itunes.apple.com and ocsp.apple.com. Closed networks may need a firewall configuration change in order to allow for this. However, I recommend going through this entire setup before changing firewall settings (I was able to get all of this working without access to ocsp.apple.com).

Building for Wireless Distribution

To prepare an app for Wireless Distribution, you need two things: an application archive (.ipa) signed with your Ad Hoc Distribution Provisioning Profile, and a manifest file (.plist). Follow these steps to prepare an application archive for Wireless Distribution:

  1. Create an archive build of your app signed with the Ad Hoc Distribution Provisioning Profile (see Ad Hoc Build Distribution).

  2. Within Xcode, open Organizer (Window menu Organizer).

  3. Go to the Archives tab and select the build you wish to distribute, press the “Distribute...” button (see Figure 5-17).

  4. For the “Select the method of distribution:” dialog box, choose “Save for Enterprise or Ad-Hoc Deployment” (see Figure 5-18) and press Next.

  5. For the “Choose an identity to sign with:” dialog box, select your Distribution signing certificate (see Figure 5-19) and press Next.

  6. You will be prompted to save the .ipa file (see Figure 5-23). Set the following fields and press Save when done:

    1. Save As: provide a name for your .ipa file.

    2. Check the “Save for Enterprise Distribution” check box.

    3. Application URL (required field): Make sure this URL has the full path to your .ipa file. Verify the filename here matches the “Save As” setting.

    4. Title (required field): Enter a suitable title for your app.

    5. Subtitle, Large Image URL, Small Image URL, and the “Add Shine Effect to Images” fields are all optional.

  7. An application archive file (.ipa) and a manifest (.plist) file will be saved to your computer.

Preparing an archive for Enterprise Distribution
Figure 5-23. Preparing an archive for Enterprise Distribution

Stage files on web server

Copy both the application archive (.ipa file) and manifest (.plist file) generated in the previous section to the location on your web server directory that accurately reflects the “Application URL” you specified in step 6. Create a web page that includes a link to the manifest file, for example:

<a href="itms-services://?action=download-manifest&url=http://192.168.1.106/apps/nextgreatapp.plist">Install NextGreatApp</a>

You will now be able to email a link to the website that contains a link similar to the example above (modified for your environment of course); users will be able to use the link to install the app onto their iOS device. Because the Ad Hoc Distribution Provisioning Profile was embedded into the application archive, it will also be installed onto their device.

Additionally, you can distribute your Ad Hoc Distribution Provisioning Profile to a user’s device via a website (providing his device is associated to the profile), by copying the file-name.mobileprovision file to the same directory and providing a link to download the profile. Users who select the link will be prompted to install the profile. Create a link to the profile file, for example:

<a href="http://192.168.1.106/apps/Ad_Hoc_Distribution_Provisioning_Profile.mobileprovision">Install Ad Hoc Provisioning Profile</a>

An example workflow here could be that the target iOS device was added to the “Devices List” after the application archive was created, so the user needs an updated Ad Hoc Distribution Provisioning Profile (with his device associated to it) in order to load and run the app.

For further reading regarding wireless application distribution, see:

http://developer.apple.com/library/ios/#featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html

App Store Build Distribution

This section covers the process to get your app deployed to the App Store. At a high level, this is a two-step process: Create a “record” of your app within the iTunes Connect web interface, and deploy the app to iTunes Connect. We’ll go through the details of setting up an app record on iTunes Connect, and then cover deploying your app using Xcode and Application Loader.

The information and methodology regarding iTunes Connect can change often, so be sure to download and refer to the iTunes Connect Developer Guide for the latest information.

Setting Up an App Record on iTunes Connect

Using the Team Agent account, log in to the iTunes Connect website (https://itunesconnect.apple.com) and follow these steps to create a record of your app. The record is what either Xcode or Application Loader will deploy the compiled binary to.

  1. Go to the Manage Your Applications section.

  2. Within the Manage Your Apps interface, press the Add New App button.

  3. If this is the first app you have ever submitted with this iOS Developer Program account, you will be directed to the New Application interface; otherwise skip to step 4. You will be asked to enter the name of your Company/Organization as you want it to appear on the App Store for all your apps. If you are deploying apps as an Individual, enter your name as you wish to be identified on the App Store. The information that you provide here is global for all apps you will develop for the App Store and your answer cannot be changed. Press Continue when done.

  4. For the App Information interface, fill in the following fields and press Continue when done (see Figure 5-24):

    Default Language

    Select the default language in which the details of your app will be displayed on the App Store. Once the app record is created, the default language can be changed at any time.

    App Name

    Enter the name for your app as it will be listed on the App Store. Your app name must be unique on the App Store and it cannot be longer than 255 characters. You can change the name of your app after it has been posted to the App Store by submitting an updated version of the app and editing the new version’s metadata.

    SKU Number

    Enter a number used to identify this release of your app. It is entirely up to you what you want to put here. A release number such as “2.4” is a common identifier. This field is not visible to customers.

    Bundle ID

    Select the App ID associated with your app. If you select a wildcard Bundle ID, you will be asked to provide a “Bundle ID Suffix.” The suffix will replace the asterisk in the Bundle ID when the app record is created. Once this app has been approved, the Bundle ID cannot be changed later.

    Information specific to the app you are deploying
    Figure 5-24. Information specific to the app you are deploying
  5. You will then be asked to set an Availability Date and Price Tier for your app. The Availability Date is the date in which you would like your app to appear on the App Store. If you would like your app posted to the App Store for download as soon as the review process is complete, set the availability date to today. If your app is going to be free, set the Price Tier to Free, otherwise review the pricing matrix using the View Pricing Matrix link to set the price of your app (see Figure 5-25). Press Continue when done.

    Setting the availability date and price tier
    Figure 5-25. Setting the availability date and price tier
  6. The next screen requires you to supply the version information and metadata for your app. Unless noted otherwise, all fields are required (see Figure 5-26). Go to the App Store and view how a few different apps are annotated. This will give you a better picture for how the information that you fill in here will ultimately be displayed. Apple does not check what is entered here for spelling or grammar; be diligent when filling out these fields.

    Version Number

    Enter the software version number as you want it to appear on the App Store to your customers. For example, 2.3.4 or 2.1.

    Copyright

    Specify the name of the person or organization that owns the rights to your app. For example, “Tom Hacker” or “2000 Acme Corporation, Inc.”

    Primary Category

    Select a category that best describes your app.

    Secondary Category (optional)

    Select a secondary category that best describes your app.

    Review Notes (optional)

    Fill in the details that you want to send to Apple regarding your app to help with the review process (instructions, demo information, usernames, passwords, etc.). The data in this field is not posted to the App Store. This field is limited to 4,000 characters.

    Setting the Version Information for your app
    Figure 5-26. Setting the Version Information for your app
  7. Fill in the Rating information as it applies to your app.

  8. Supply the metadata for your app. Unless noted otherwise, all fields are required (see Figure 5-27).

    Description

    Enter the description of your app as it will appear on the App Store directly below your app’s title. The Description field must be at least 10 characters in length and you are limited to 4,000 characters.

    Keywords

    Fill in a list of keywords that best describe your app. These keywords will be referenced when customers are searching the App Store. This field is limited to 100 characters.

    Support Email Address

    Fill in the email address Apple will use to contact you during the review process. This email address is not posted to the App Store.

    Support URL

    Enter the URL customers can use to get support or information about your app. This URL will be posted on the App Store within the details of your app.

    Marketing URL (optional)

    This is an optional field that will be published to the App Store for customers to get more information about your app.

    Privacy Policy URL (optional)

    Optionally provide the URL to your Organization’s privacy policy. This URL will be posted on the App Store within the details of your app.

    Setting the metadata for your app
    Figure 5-27. Setting the metadata for your app
  9. You have the option of using the standard End User License Agreement (EULA) or uploading your own. If you upload your own EULA, you will have to select the countries in which your EULA applies. For all other countries, the standard EULA applies.

  10. Use the Uploads section to brand your app. You must upload a large 1024 × 1024 pixels icon and at least one screenshot.

    Large 1024 × 1024 icon

    Upload an app icon identical to the icon file used for your app that is 1024 × 1024 pixels in size and a minimum of 72dpi. Do not “round” the corners; Apple will take care of that.

    iPhone and iPod touch Screenshots

    Upload up to five iPhone / iPod touch screenshots here. The order in which they are uploaded does not matter, but make sure your primary screenshot is leftmost; you can drag and drop the images to change the order once you have all of them uploaded. According to the iTunes Connect website: “iPhone and iPod touch Screenshots must be .jpeg, .jpg, .tif, .tiff, or .png file that is 960×640, 960×600, 640×960, or 640×920 pixels, at least 72 DPI, and in the RBG color space.”

    iPhone 5 and iPod touch (5th generation) Screenshots

    If your app binary utilizes the screen dimensions of the iPhone 5 / iPod touch (5th generation), you must upload at least one screenshot (with a maximum of five) with iPhone 5 / iPod touch (5th generation) dimensions. The order in which they are uploaded does not matter, but make sure your primary screenshot is leftmost; you can drag and drop the images to change the order once you have all of them uploaded. According to the iTunes Connect website: “iPhone 5 and iPod touch (5th gen) Screenshots must be .jpeg, .jpg, .tif, .tiff, or .png file that is 1136x640, 1136x600, 640x1136 or 640x1096 pixels, at least 72 DPI, and in the RGB color space.”

    iPad Screenshots

    Upload up to five iPad screenshots here. The order in which they are uploaded does not matter, but make sure your primary screenshot is leftmost; you can drag and drop the images to change the order once you have all of them uploaded. According to the iTunes Connect website: “iPad Screenshots must be .jpeg, .jpg, .tif, .tiff, or .png file that is 1024x768, 1024x748, 768x1024, 768x1004, 2048x1536, 2048x1496, 1536x2048 or 1536x2008 pixels, at least 72 DPI, and in the RGB color space.”

  11. Once you save your app information, your app record is created with a status of “Prepare for Upload.”

  12. When your app is ready to be reviewed by Apple, you can then go into the details of your app and press the “Ready to Upload Binary” button. You will be asked a few questions about export compliance regarding encryption. Once you press Continue, the status of your app will change to “Waiting for Upload.” You can now use either the Submit function within Xcode Organizer to upload an archive, or Application Loader to upload a ZIP file to iTunes Connect to start the review process.

Now that your app record is created, you can click on the app icon to manage the details of your app. From here you can select “Rights and Pricing” to manage the availability date, price tier, and the countries where you wish your app to be available (see Figures 5-28 and 5-29).

Details of your app record on iTunes Connect
Figure 5-28. Details of your app record on iTunes Connect
Setting Pricing and Store Availability
Figure 5-29. Setting Pricing and Store Availability

App Store Distribution Using Xcode

This section details how to submit an application archive to iTunes Connect through Xcode Organizer. The workflow here is not to build an App Store archive from scratch, but re-signing an existing (fully tested) build archive with the App Store Distribution Provisioning Profile. Prior to submitting your app to iTunes Connect, verify the following:

  • You have set up a record for your app within iTunes Connect, and the status of that record is “Waiting For Upload” (see Setting Up an App Record on iTunes Connect).

  • You have already built an Archive build of your app and it is available within Xcode Organizer (see Ad Hoc Build Distribution).

  • You have provided all applicable icons and at least one launch image within your application bundle (see Icons and Launch Images).

  • If this is an update to an app that is already available on the App Store, make sure the CFBundleShortVersionString and the CFBundleVersion within the Info.plist file are both higher than that of the current version on the App Store. The CFBundleShortVersionString is set within your target’s Info “Bundle versions string, short” setting. The CFBundleVersion is set within your target’s Info “Bundle version” setting. Both of these numbers must be a period-separated list of at most three non-negative integers (for example, 2.1 or 3.1.2).

Using Xcode Organizer, you can choose to validate your app archive without actually submitting it to iTunes Connect. The validation process checks to see whether your app binary is ready to be submitted (properly signed, with correct icon files and version numbers). When you submit your app to the App Store, validation also runs and (providing validation passes), uploads your app to iTunes Connect for review. Follow these steps to validate or submit your archive to iTunes Connect using Xcode Organizer (see Figure 5-31):

  1. Open Xcode.

  2. Launch Organizer (Xcode Window menu Organizer).

  3. Go to the Archives tab and highlight the archived build you wish to submit to, or validate with iTunes Connect.

  4. Press the Validate button if you wish just to run the validation process without submitting the app. Press the Distribute button if you wish to validate and submit your app to iTunes Connect to begin the review process.

  5. If you are distributing your app to the App Store, for the “Select the method of distribution:” dialog box, choose ‘Submit to the iOS App Store', and press Next (see Figure 5-30).

    Using Organizer to submit your app to Apple
    Figure 5-30. Using Organizer to submit your app to Apple
  6. You will be prompted for your login credentials. Enter the Team Agent username and password and press Next.

  7. The next screen asks you to choose your application record and signing identity. Choose the app that corresponds to the record of your app on iTunes Connect (see Figure 5-32), which must have a status of “Waiting For Upload.”

    Application

    Select the app record from the drop-down list. Only apps that have a status of “Waiting for Upload” on iTunes Connect are displayed as options.

    Identity

    Select your App Store Distribution Provisioning Profile and press Next.

  8. Any validation issues will be displayed (and must be addressed before you can upload), otherwise your app will be uploaded to iTunes Connect and the status of your app record will change to either “Upload Received” or “Waiting for Review.” Press Finish when done (see Figure 5-33).

Using Organizer to validate or submit your app to Apple
Figure 5-31. Using Organizer to validate or submit your app to Apple
App Store Distribution packaging and signing options
Figure 5-32. App Store Distribution packaging and signing options
The app was validated successfully
Figure 5-33. The app was validated successfully

App Store Distribution Using Application Loader

You can use Application Loader (installed with Xcode) to submit your app to iTunes Connect. A potential workflow here is that the app was developed by company A and the ZIP file has been given to company B, who will deploy the app using their name and credentials. Another scenario could be that you have built your app using the xcodebuild command line utility and have compressed the resulting .app directory into ZIP format for deployment (see Building for App Store Distribution with xcodebuild). The same prerequisites apply as when you are submitting an archive via Xcode Organizer (see App Store Distribution Using Xcode). Follow these steps to submit your ZIP archive to iTunes Connect using Application Loader:

Note

Application Loader is installed with Xcode and can be opened by selecting Xcode → Open Developer Tool → Application Loader. It can also be downloaded separately from https://itunesconnect.apple.com/apploader/ApplicationLoader_2.7.dmg.

  1. Open Application Loader (Xcode menu Open Developer Tool Application Loader).

  2. Once you agree to the license, you will be prompted for your iOS Dev Center login credentials. Log in with the Team Agent account (see Figure 5-34). Press Next at the Welcome screen.

    Tip

    Application Loader saves your login credentials. To reset your account settings, use Window menu “Sign In As...” You may need to do this if you were to change the password for the Team Agent account.

  3. Press the “Deliver Your App” button (see Figure 5-35).

  4. For the “Choose your Application” dialog box, select your app with the current status of “Waiting for Upload” on iTunes Connect (see Figure 5-36) and press Next.

  5. Your Application Information will be displayed. Press the Choose button (see Figure 5-37). Browse to your AppName.zip file, select it, and press Open.

  6. Once your archive is selected, press the Send button (see Figure 5-38). The validation process will run and upon successful completion, your AppName.zip file will be uploaded to iTunes Connect.

  7. Press Done after your app has been uploaded to iTunes Connect. The status of your app record will change to either “Upload Received” or “Waiting for Review.”

Log in with your Team Agent account
Figure 5-34. Log in with your Team Agent account
Delivering your app binary to iTunes Connect
Figure 5-35. Delivering your app binary to iTunes Connect
Select the application record in iTunes Connect
Figure 5-36. Select the application record in iTunes Connect
Your Application Information from iTunes Connect
Figure 5-37. Your Application Information from iTunes Connect
Upload your app to iTunes Connect
Figure 5-38. Upload your app to iTunes Connect

The Approval Process

Congratulations! Your application binary has been uploaded to iTunes Connect. Hopefully there will be a relatively short period of time in which your app will be reviewed, approved, and posted to the App Store by Apple. Apple does provide an online form where you can Request an Expedited App Review for your app if you have an urgent bug fix or (to quote the linked website) “are facing extenuating circumstances”.

Updating an App on iTunes Connect

This section covers how to update an app that you already have available on the App Store. Using the Team Agent account, log in to the iTunes Connect website (https://itunesconnect.apple.com) and follow these steps to create a new record for the next version of your app:

  1. Go to the “Manage Your Apps” section.

  2. Click on the icon for the app you wish to update; the interface opens for managing the app you selected.

  3. Press the Add Version button, which is to the right of the current version.

  4. Fill in the following fields and press Save when done:

    Version Number

    Enter the software version number as you want it to appear to customers on the App Store. This version number should be greater than the current version.

    What’s new in this Version

    Enter as much or as little information you would like here. This could be as simple as “Bug Fixes.” The data entered here will be displayed to customers to explain what has changed in the updated app.

  5. You will then be asked a few questions about export compliance regarding encryption. Once you press Continue, the status of your app record will change to “Waiting for Upload.”

  6. Use the Submit function in Xcode Organizer to upload an archived build to iTunes Connect (see App Store Distribution Using Xcode), or use Application Loader to upload a compressed AppName.zip binary (see App Store Distribution Using Application Loader).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.220.16