1. Synopsis

TestFlight is a platform that you can use to distribute development builds of your apps to you team members. You receive feedback, console logs and crash reports automatically. It can be very useful during the development cycle of an app.

You can create an account on http://testflightapp.com. It’s free.

2. Installation

We recommend the use of the motion-testflight gem which provides a seamless experience.

$ gem install motion-testflight

The source code of the motion-testflight gem lives on the HipByte/motion-testflight GitHub repository.

3. Unpack the SDK

You will need to download the TestFlight SDK package from http://testflightapp.com/sdk/download and unpack it into the vendor directory of your RubyMotion project.

The directory structure you need is this:

$ ls vendor/TestFlight
README.txt                      libTestFlight.a
TestFlight.h                    release_notes.txt

4. Change your project configuration

You will need to change the Rakefile of your project in order to set up the gem.

First, you need to require the gem. Add the following line at the beginning of the file, right after the other require statements:

require 'rubygems'
require 'motion-testflight'

Now that the gem is loaded, it’s time to configure it. Inside your application configuration block, add the following lines:

app.testflight.sdk = 'vendor/TestFlight'
app.testflight.api_token = '<insert your API token here>'
app.testflight.team_token = '<insert your team token here>'
app.testflight.app_token = '<insert your app token here>' *(TestFlight SDK 1.2 and greater)*

You can retrieve the values for api_token and team_token from your TestFlight account page, and the value for your app_token from your App page.

Optionally, you can use the distribution_lists key if you do want to set up a distribution list for your submissions.

app.testflight.distribution_lists = ['CoolKids']

5. Usage

You will see that a new rake task is available, rake testflight, which will automatically submit a development build of your app to TestFlight.

The notes argument must be provided; its content will be the actual release notes for the submission.

$ rake testflight notes='zomg!'