Reader small image

You're reading from  Apple Watch App Development

Product typeBook
Published inApr 2016
Reading LevelIntermediate
Publisher
ISBN-139781785886362
Edition1st Edition
Languages
Right arrow
Author (1)
Steven F. Daniel
Steven F. Daniel
author image
Steven F. Daniel

Steven F. Daniel is the CEO and founder of GENIESOFT STUDIOS, a software development company based in Melbourne, Victoria, that focuses primarily on developing games and business applications for the iOS, Android, and Mac OS X platforms. He is an experienced software engineer with more than 17 years' experience and is extremely passionate about making people employable by helping them use their existing skills in iOS, Android, and Xamarin to get the job done. He is a member of the SQL Server Special Interest Group (SQLSIG), CocoaHeads, and the Java Community. He was the co-founder and Chief Technology Officer (CTO) at SoftMpire Pty Ltd., a company focused primarily on developing business applications for the iOS and Android platforms.
Read more about Steven F. Daniel

Right arrow

Chapter 11. Packaging and Deploying Your App

You have now successfully built your application, and are ready to release it to the rest of the world. All you need to do is decide how to deploy and market your app.

In this chapter, we will look at what is required to submit your application to the Apple App Store, and share your creations with the rest of the community. You'll also learn how to set up your iOS development team as well as the certificates needed for both development and distribution.

Here, we will also explain how to use the Instruments application that comes with Xcode to effectively profile your application for eliminating performance bottlenecks. In the final sections, you will learn how to create the provisioning profiles for both development and distribution, as well as creating the necessary App IDs for your application, before finally learning how to register your iOS devices.

This chapter includes the following topics:

  • Creating an iOS development certificate, and setting...

Creating and setting up your iOS development team


In this section, you will learn how to create and set up your iOS development team.

Before you can submit your application to the Apple App Store for approval, you will need to set up your iOS development team, so let's get started:

  1. Log in to the iOS Developer portal at http://developer.apple.com/.

  2. Click on the Member Center link that is located right at the top of the screen.

  3. Sign in to your account using your Apple ID and password. This will then display the Developer Program Resources page, as we saw in the Setting up and provisioning your app for Apple Pay section in Chapter 6, Implementing Tables within Your App.

  4. Next, click on the iTunes Connect button. This is where you will be able to check various things such as sales, trends, payments, financial reports, and app analytics:

  5. Next, click on the Users and Roles button, as highlighted in the preceding screenshot. This will bring up the Users and Roles option pane from where you can add a new...

Creating the iOS development certificate


In this section, you will learn how to create the iOS development certificate that will enable you to run and test your apps on the iOS device. We will begin by generating the iOS development certificate that will be encrypted, and which will serve the purpose of identifying you digitally.

You will then need to sign your apps using this certificate before you can run and test any application that you develop on your iOS device. To begin with, follow these simple steps:

  1. Launch the Keychain Access application, which can be found in the /Applications/Utilities folder.

  2. Next, choose the Request a Certificate From a Certificate Authority… menu option from Keychain Access | Certificate Assistant.

  3. Then you need to provide some information in the Certificate Information section before the certificate can be generated.

  4. Next, enter the required information, as shown in the following screenshot, whilst ensuring that you have selected the Saved to disk and the Let...

Obtaining the development certificate from Apple


In this section, you will learn how to obtain the development certificate from Apple to enable you to begin developing apps.

Before you can begin submitting your applications to the Apple App Store, you will need to obtain your own copy of the iOS development certificate; this certificate is basically a unique identity for each of the apps that you submit for approval. So let's get started:

  1. Log in to the iOS Developer portal at http://developer.apple.com/.

  2. Click on the Member Center link that is located right at the top of the screen.

  3. Sign in to your account using your Apple ID and password. This will then display the Developer Program Resources page, as we saw in the previous section.

  4. Next, click on the Certificates, Identifiers & Profiles button, and then click on the + button that is displayed on the next screen.

  5. Choose the iOS App Development option under the Development section, as highlighted in the preceding screenshot.

  6. Click on the Continue...

Creating App IDs for your WatchKit applications


In previous sections, you learned how to request a certificate from Apple to provide us with the ability to code-sign our applications, and to use the generated certificate request file to generate our deployment certificate.

In this section, we will look at how to create the application's App IDs so that we can use them to deploy our applications for testing on an iOS device:

  1. Log in to the iOS Developer portal at http://developer.apple.com/.

  2. Click on the Member Center link that is located right at the top of the screen.

  3. Sign in to your account using your Apple ID and password. This will then display the Developer Program Resources page, as we saw in the previous section.

  4. Then click on the Certificates, Identifiers & Profiles button that is displayed as one of the options on this screen.

  5. Next, click on the App IDs item located in the Identifiers group on the left-hand side of the page, and click on the + button to display the Register iOS App...

Creating development provisioning profiles


In this section, you will learn how to create development provisioning profiles so that your applications can be installed on the iOS device, and you can deploy and test your applications prior to deploying your app to the Apple App Store:

  1. Log in to the iOS Developer portal at http://developer.apple.com/.

  2. Click on the Member Center link that is located right at the top of the screen.

  3. Sign in to your account using your Apple ID and password. This will then display the Developer Program Resources page, as we saw in the previous sections.

  4. Click on the Certificates, Identifiers & Profiles button that is displayed as one of the options on this screen. Then click on the All item under the Provisioning Profiles section on the left-hand side of the page.

  5. Next, click on the + button to display the Add iOS Provisioning Profiles section, as highlighted in the following screenshot:

  6. Choose the iOS App Development option from the Development section, and then...

Profiling your application using Xcode Instruments


In this section, we will focus on how to effectively use Xcode Instruments within our applications to track down areas that could be affecting the overall running performance.

These types of issues could potentially cause an application to run slowly, or even crash on the user's iOS device. We will look at how to profile our Animation Example application using the Leaks instrument that will help track down any memory leaks within our code, which may not have been released correctly and may thus affect the application's overall performance.

To begin profiling your application using the Instruments application, follow these simple steps:

  1. Select the AnimationExample.xcodeproj file from the Chapter 10 folder in the accompanying code bundle.

  2. Next, ensure that the AnimationExample Xcode project file is open within the Xcode development IDE.

  3. Choose Profile from the Product menu, or alternatively, use the keyboard shortcut, Command + I:

  4. Once this option...

Preparing your app for submission using iTunes Connect


Now that you have tested your application to ensure that everything works fine and is free from errors, you should start preparing your application so that it is ready for submission to the Apple App Store.

To prepare your application using Xcode, follow these simple steps:

  1. Ensure that the AnimationExample Xcode project file is already open within the Xcode IDE, and choose the Preferences… option from Xcode | Preferences… menu, or alternatively, by press Command + ,.

  2. Next, ensure that the Accounts tab has been selected, then click on the + button and choose the Add Apple ID… menu option, as shown in the following screenshot:

  3. Enter your Apple Developer credentials by specifying both the Apple ID and Password.

    Note

    Once Xcode has validated your Apple credentials, you will be presented with a screen similar to the one shown in the preceding screenshot. This screen shows you the team that you belong to as well as your role within the team. You...

Submitting an app to iTunes Connect using Xcode


In this section, you will learn how to archive an app ready for submission to the Apple App Store, using the Xcode integrated development environment. To submit your application, follow these simple steps:

  1. Ensure that the AnimationExample.xcodeproj project from the Chapter 10 folder in the accompanying code bundle is already open within the Xcode IDE.

  2. Next, open the Scheme menu, and choose the Manage Schemes… option. Alternatively, you can use the Product | Scheme | Manage Schemes… menu option.

  3. Then, select the AnimationExample WatchKit App scheme, and then click on the Edit… button located at the bottom of the Manage Schemes pane, as shown in the following screenshot:

  4. Ensure that the Destination option is set to use iOS Device, and that the Build Configuration option is set to use the Release scheme. Then click on the Close button to commit the changes, and exit from the scheme manager.

  5. Next, choose the Product | Archive menu option from the Xcode...

Summary


In this chapter, you learned how to effectively debug your app, using Instruments to eliminate potential memory leaks. You also learned how to create and set up your iOS development team as well as the associated iOS development certificate that enables you to run and test your apps on an iOS device. After that, we moved on to describing the way to create App IDs for our apps; these App IDs are used within Xcode to associate your app with the one assigned as part of your provisioning profile.

Once we created all the necessary development certificates and provisioning profiles, we looked at how to profile our application using the Instruments application that comes as part of Xcode. You learned how to use the Leaks instrument to help detect any memory leaks within our Animation Example app; this instrument ensures that objects are allocated and released correctly.

Additionally, you learned how to package your app, deploy it to iTunes Connect in order to download and test your app on...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Apple Watch App Development
Published in: Apr 2016Publisher: ISBN-13: 9781785886362
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Steven F. Daniel

Steven F. Daniel is the CEO and founder of GENIESOFT STUDIOS, a software development company based in Melbourne, Victoria, that focuses primarily on developing games and business applications for the iOS, Android, and Mac OS X platforms. He is an experienced software engineer with more than 17 years' experience and is extremely passionate about making people employable by helping them use their existing skills in iOS, Android, and Xamarin to get the job done. He is a member of the SQL Server Special Interest Group (SQLSIG), CocoaHeads, and the Java Community. He was the co-founder and Chief Technology Officer (CTO) at SoftMpire Pty Ltd., a company focused primarily on developing business applications for the iOS and Android platforms.
Read more about Steven F. Daniel