Preface

I wrote this book for the people beating their heads against their desks, late at night, wondering why on earth Xcode will not code sign their apps, or install onto their iPhones. These people have probably visited 100 different websites hoping for that magic glimmer of tribal knowledge that will make everything work so that their app will suddenly load onto their iOS device. This book is an attempt to explain the nuances of the iOS build and release process with the hope of alleviating some of the pain that may come along with it. If you’re a developer, this book will allow you to spend more time focusing on development, and less time focusing on the build and release process. If you’re a release engineer managing iOS applications for a corporation, the material presented here will help you facilitate the build process, manage multiple iOS devices, and make the distribution process for an iOS app much easier.

Anyone who has dived into the development or building of an iOS app is familiar with the amount of time you can spend trying to figure out how the build and distribution of an app actually works. As someone who has managed the build and release process for multiple iOS apps, I can attest to the lack of clear, concise documentation for the build and deployment processes that are an essential part of the development cycle. For something that can take a tremendous amount of time, I was surprised how many iOS programming books barely address (or avoid) this topic altogether. Which is exactly the reason I decided to write this book. In fact, this may be the only book about iOS development that has nothing to do with iOS development. There isn’t a single line of Objective-C covered here. This book covers what you have to know to get your app distributed to iOS devices for testing, and to the App Store.

For all readers, my hope is that this book saves you a lot of time and becomes a handy addition to your iOS build and release toolset.

What’s Needed

A Mac

You’ll need a Mac running, at a minimum, OS X v10.7 (Lion) or OS X v10.8 (Mountain Lion). For best results when accessing the websites referenced within this book, use the Safari web browser, as content hosted by Apple may not render correctly with other browsers.

Xcode

You’ll need to install, at a minimum, Xcode 4.5 on your Mac. Xcode is a free download from the App Store, and available for download for members of an iOS Developer Program within the iOS Dev Center website.

An iOS Device

You’ll need at least one iOS device to load your app onto. At the time of this writing this includes the iPad, iPad mini, iPhone, and iPod touch.

Membership in an iOS Developer Program

In order to deploy your app onto a device for testing, you’ll need to be enrolled in either the iOS Developer Program or the iOS Enterprise Developer Program. Enrollment in the iOS Developer program is either as an “Individual” or a “Company/Organization.”

Contents of This Book

This book is organized into three parts. Chapters 1 through 4 focus on the setup of your development environment. Chapters 5 and 6 focus on the build and release process. Chapter 7 documents how to setup Passes for your development environment. As it would be impossible to address each and every reason for why you may encounter a code signing or build error, I have attempted to lay out a proper way to set up your development and build environments to mitigate the chances of errors occurring. Additionally, I have taken the liberty of repeating myself several times throughout this book, as most sections are designed to stand alone so that you can pick up and read exactly what you are looking for without having to read the previous sections or chapters.

Chapter 1, Introduction to iOS Build and Release

This introductory chapter provides an overview of the iOS Dev Center website, and then focuses on getting your personal development environment (a Mac and an iOS device) up and running using Xcode Organizer.

Chapter 2, App IDs, Keys, and Certificates

This first part of this chapter explains the setup of App IDs on the iOS Provisioning Portal website. The second part covers the setup of the Development and Distribution Certificates which are used to sign your app before it can be deployed.

Chapter 3, iOS Devices and Provisioning Profiles

This chapter covers what you need to consider when setting up iOS devices for testing, along with how to do it. The remainder of this chapter focuses on bringing the previous topics together with the setup and management of Provisioning Profiles.

Chapter 4, Additional Services

This chapter focuses on the additional, optional services you may wish to add to your iOS app including Apple Push Notification Service, iCloud, Passes, and Data Protection.

Chapter 5, Build and Release

Now that the setup part of iOS development has been covered, it’s time to build. This chapter covers the different types of builds and methods for releasing your app internally and to the App Store.

Chapter 6, Build Automation

This chapter is for build and release engineers who have to focus on automating the build of iOS apps for an organization.

Chapter 7, Passes

This chapter documents what it takes to setup the development framework for Passes. You can use the information here to verify your Pass Type ID and Certificate are setup correctly prior to running a Passes signing application in a production environment.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and file extensions.

Constant width

Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.

Constant width bold

Shows commands or other text that should be typed literally by the user.

Constant width italic

Shows text that should be replaced with user-supplied values or by values determined by context.

Tip

This icon signifies a tip, suggestion, or general note.

Caution

This icon indicates a warning or caution.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Essential iOS Build and Release by Ron Roche (O’Reilly). Copyright 2012 Ronald Roche, 978-1-449-31394-4.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

Safari® Books Online

Note

Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.

With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.

O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:

http://shop.oreilly.com/product/0636920022282.do

To comment or ask technical questions about this book, send email to:

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Content Updates

January 25, 2013

  • Updated for iOS 6 and Xcode 4.6

  • How to configure additional services for your app, such as Apple Push Notification Service, iCloud, Passes, and Data Protection (new Chapter 4)

  • How to set up and use Passes for Passbook (new Chapter 7)

Acknowledgments

Special thanks to Andy Oram for editing this book and providing his invaluable expertise and guidance to me.

A sincere thank you to Vandad Nahavandipoor for doing the technical review of my manuscript. I can’t express how grateful I am for Vandad’s comments, suggestions, and correspondence with me throughout this process.

Thank you Chris Byrne at Workday for helping me out at the beginning of this project.

My deepest thanks to my wife, Patricia, for encouraging me, giving me the time to write this book, and reading countless drafts of my manuscript. Her insight and thoughtful advice made this book much better than it ever could have been.

Get Essential iOS Build and Release now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.