Pro iOS Continuous Integration

Book description

Pro iOS Continuous Integration teaches you how to utilize the strengths of continuous integration in your everyday work. CI is more popular now than ever, as iOS developers realize how time-consuming building and deploying an application for testing purposes and quality assurance can be. This book shows you how to make your developing life easier,with real-world applications and examples.

With this book, you will learn what continuous integration and continuous delivery really are and how they can be used in your iOS projects. You will learn how to release an iOS application outside the App Store using Xcode. You'll understand how to leverage the power of the command line to build your projects, and run your tests. You'll use Jenkins and Bamboo to architect automatic builds and automate the whole build process. In addition, you'll also learn how to use Xcode server and bots, what quality assurance tools can be used to measure the quality of your code, and how to send builds to your beta testers.

Author Romain Pouclet provides hands-on, practical experience in iOS continuous integration and, using this book, you will see that it's not actually that hard to set up a fully-featured continuous integration platform, whether you are an independent iOS developer working from home or a member of a team in a big company.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Technical Reviewers
  9. Acknowledgments
  10. Introduction
  11. Chapter 1: Introduction to Continuous Integration
    1. What is Continuous Integration?
    2. Apple History 101
    3. Pros & Cons
    4. The Road Ahead
    5. Sample Application: Github Jobs
    6. Prerequisites
    7. Summary
  12. Chapter 2: Continuous integration features in iOS and Xcode
    1. Sample application: Github jobs
      1. Creating the Application
    2. What Xcode Gives Us
      1. Application’s Info file
      2. Tests
      3. Git Integration
      4. CocoaPods
    3. Coding the Sample Application
      1. Why Have We Done All This?
    4. Getting Ready to Release the Application
      1. Custom Build Settings
      2. Build Phases
    5. Summary
  13. Chapter 3: Using Xcode to Release an Application Outside the App Store
    1. What We Need
    2. Getting Ready to Release the Application
      1. Collecting Feedback from Crash logs
      2. Creating the IPA file
      3. Installing the Application on the Tester’s Device
      4. But... This is a Terrible Process!
      5. Installing the Application on the Tester's Device
    3. Installing Multiple Versions of the Application
    4. Summary
  14. Chapter 4: Invoking the Power of the Command Line
    1. Command Line Interface?
    2. Introducing Shenzhen
    3. Juggling with Multiple Installations of Xcode
    4. Building the Application
      1. Building the Application Using xcodebuild
      2. Building the Application Using Xctool
      3. Formatting xcodebuild output using xcpretty
    5. Anatomy of an Xcode Project File and Scheme Sharing
    6. Creating the IPA File From the Command Line
    7. Choosing the Destinations
    8. Toying with the Application Manifest
    9. Bumping the Build Version Using Agvtool
    10. Wrapping it Up and Calling it a Day
    11. Summary
  15. Chapter 5: Automatic Builds with Jenkins
    1. Why Do We Need an Automated Build Platform?
    2. Jenkins and Hudson: A Bit of History
    3. Getting Started with Jenkins
      1. Installing Jenkins Using the Command Line
      2. Loading Jenkins at Startup
    4. Having a Look Around
    5. Tuning Jenkins
    6. Your First Jenkins Job Using the Xcode Plugin
      1. Creating an SSH key dedicated to Github
      2. Building the Github Job Applications
      3. Archiving the generated IPA
    7. Jenkins Power User Features
      1. Jenkins REST API
      2. Jenkins from the Command Line
    8. Getting Feedback
      1. Receiving Notifications and Fixing the Build Right Away
      2. Watching the State of Multiple Projects
    9. Integrating Our Build Script
      1. Updating the Build Number
      2. Unlocking the Keychain
      3. Cleaning up after yourself
    10. Integrating Xcode Builds into an Existing Jenkins Installation
      1. Slave Node Basics
      2. Anatomy of a Jenkins Slave Node
    11. Managing Provisioning Profiles and Private Keys
    12. Where Do We Go From Here?
    13. Summary
  16. Chapter 6: Automated builds with Bamboo
    1. Getting started with Bamboo
      1. Installing Bamboo using the command line
      2. Getting ready for production use
    2. Having a look around: a different approach than Jenkins
    3. Extending Bamboo
      1. Configuration of the default job
      2. Summing up the Bamboo Basics
    4. Building the Github Jobs application
      1. Using environment variables
      2. Archiving the artifacts
    5. Bamboo Power user features
      1. Rest API
      2. Wallboards
    6. Getting feedback
      1. Build multiple branches
      2. Build early, build often
      3. Setting up a hook with Bamboo
      4. Setting up nightly builds
    7. Integrating Xcode builds into an existing Bamboo installation
      1. Installing the remote agent
      2. Configuring the agent
      3. Updating the job to run on the remote agent
    8. Summary
  17. Chapter 7: Over-The-Air distribution
    1. What is Over The Air distribution?
      1. What does it have to do with continuous integration?
      2. iOS app distribution: a valid business model
    2. Distributing the app using TestFlight
      1. TestFlight for the power user
      2. Uploading the app to TestFlight at the end of a Jenkins build
      3. Uploading the app to TestFlight at the end of a Bamboo job
    3. Writing your own distribution platform
      1. Understanding the provisioning profile
      2. iTunes Music Store XML manifest to the rescue
      3. Bonus: setting up ACL using the provisioning profile
    4. Summary
  18. Chapter 8: Day-to-day use of Xcode bots
    1. Why do we need yet another continuous integration tool?
    2. OS X server
      1. A bit of history
      2. Installing OS X server on your computer
    3. Xcode 6
      1. Continuous integration
      2. Communicating with Xcode service from Xcode
    4. Setting up Github Jobs
      1. Nightly build of Github Jobs for iOS using Xcode bots
    5. Managing the Xcode service from the web interface
      1. Downloading the latest version of the application
      2. Using the big screen feature to get live feedback
    6. Summary
  19. Chapter 9: Adding Unit testing to the mix
    1. Automated Testing
      1. Reasons to test
      2. Reasons not to test
    2. Unit testing
      1. Xcode unit testing integration
      2. Adding tests for the PCSJobOffer class
      3. Creating the test case class
      4. Running the test
      5. Running the tests from the command line
      6. Analyzing the results
      7. Running tests from Jenkins
      8. Running tests from Bamboo
      9. Running tests using an Xcode bot
    3. Summary
  20. Chapter 10: Quality assurance
    1. What is quality assurance?
    2. Static analysis
      1. Performing a simple static analysis using clang
      2. Performing a Static analysis from an Xcode bot
      3. Using OCLint to Get Additional Feedback
    3. Summary
  21. Index

Product information

  • Title: Pro iOS Continuous Integration
  • Author(s):
  • Release date: August 2014
  • Publisher(s): Apress
  • ISBN: 9781484201244