---
title: Continuous Delivery for Enterprise on iOS
description: Learn to set up continuous deployment for iOS using HockeyApp, including installation, configuration, and automation of build uploads.
---

[Blog ](https://www.metaltoad.com/blog)

# [Continuous Delivery for Enterprise on iOS](https://www.metaltoad.com/blog/continuous-delivery-for-enterprise-on-ios)

 Written by [Metal Toad Staff](https://www.metaltoad.com/blog/author/metal-toad-staff) | Jan 23, 2015 12:00:00 AM

In part two ([part one](https://www.metaltoad.com/blog/ios-continous-integration-for-enterprise)) of a series on iOS automation, we'll discuss continuous deployment. Thankfully, due to wonderful tools like Hockey, it’s never been easier. In this post, we’ll go over installing the native Hockey app on your server, configuring its associated command line utility, and setting up a post-build trigger that will automatically upload your XcodeBots build and release it on Hockey.

## Prerequisites

You'll need a Bot that builds enterprise (or ad-hoc) signed builds. We went over how to accomplish that at length in the [first part](https://www.metaltoad.com/blog/ios-continous-integration-for-enterprise) of this series. You'll also still need all the prerequisites mentioned in that post, quoted here to save you a click:

> This post is assuming that you’re using OS X Yosemite, OS X Server 4, and Xcode 6. If your project has CocoaPods dependencies, you’ll need to install that on your CI server as well.

## Installing Hockey App and Configuring the CLI

From your OS X Server box, download and install Hockey for Mac. You can optionally sign in once you've launched the app, but it won't be necessary for our purposes. Visit the app’s preference panel (`⌘+,`), and click `Install` on the command line helper.

## Set Application up on Hockey

If you don't already have one, click `New App` from the Hockey dashboard (You can create it manually if you don't have a build ready just yet). Once your app is created, or if you already have one, move on to the next step.

## Set up an After-Integration Trigger

From your existing XcodeBot, select `Edit Bot…` and press next until you arrive on the final screen. There, press `Add Trigger` then `Run Script` under “After Integration.”

Thankfully, our Hockey command line helper does most all of the work from here, we just need to launch it. Here's a simple script to do so (new lines added for readability):

```
#!/bin/bash
/usr/local/bin/puck -submit=auto -download=true -notify=true -notes="Daily Build" -api_token=<YOUR_API_TOKEN> -app_id=<YOUR_APP_ID> "$XCS_ARCHIVE"
```

Here's a breakdown of the arguments we're using:

 

`-submit`

We need `auto` here, `manual` is a non-starter for automated deployment.

`-download`

Whether or not we want testers to be able to download this build.

`-notify`

Whether or not testers should receive a notification email when the upload finishes

`-notes`

Simple Release notes to be attached to the build

`-api_token`

Generated [here](https://rink.hockeyapp.net/manage/auth_tokens) (login required).

`-app_id`

From the application’s Hockey page

The Hockey command line helper has a whole host of other options [documented here](http://support.hockeyapp.net/kb/services-webhooks-desktop-apps/how-to-upload-to-hockeyapp-on-a-mac#command-line-helper-options) for the curious.

The final argument (`"$XCS_ARCHIVE"`) is an ENV variable set by XcodeServer that identifies the path to the `.xarchive` folder created by your bot. Because we're uploading the entire archive, we get desymbolication of every build our bot uploads for free! If you've integrated the Hockey SDK into your app for crash logging, all the crash logs your testers upload will have fully symbolicated stack traces.

## Finalization

Once your script is entered, make sure that it’s marked to only run on success. Press `Update`. The next time your integration runs, your build should automatically upload to Hockey and be downloadable by your testers. Assuming you've got the HockeySDK integrated with your app and that you've incremented your build number, all your testers will be prompted to update the next time they launch the app.

[View full post](https://www.metaltoad.com/blog/continuous-delivery-for-enterprise-on-ios)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Metal Toad Staff"
  },
  "dateModified" : "2025-04-25T16:30:16.158Z",
  "datePublished" : "2015-01-23T00:00:00Z",
  "headline" : "Continuous Delivery for Enterprise on iOS",
  "image" : {
    "@type" : "ImageObject",
    "height" : 500,
    "url" : "https://6104926.fs1.hubspotusercontent-na1.net/hubfs/6104926/Imported_Blog_Media/apple-blog-header-Aug-11-2023-10-04-11-8570-PM.png",
    "width" : 870
  },
  "mainEntityOfPage" : "https://www.metaltoad.com/blog/continuous-delivery-for-enterprise-on-ios",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://6104926.fs1.hubspotusercontent-na1.net/hubfs/6104926/social-suggested-images/6104926.fs1.hubspotusercontent-na1.nethub6104926hubfsMetal_Toad_Logo_orange_horizontal-50-1.jpg",
      "width" : 240.00002
    },
    "name" : "Blog"
  }
}
```