\----------------------------------\
    \                                  \        __
     \   The best way to build and      \       | \
      >   deploy your iOS apps to:       >------|  \       ______  
     /     www.testflightapp.com        /       --- \_____/**|_|_\____  |
    /                                  /          \_______ --------- __>-}
   /----------------------------------/              /  \_____|_____/   |
                                                   *         |
                                                            {O}

   /*\       /*\              /*\       /*\       /*\            /*\        /*\
  |***|     |***|            |***|     |***|     |***|          |***|      |***|
   \*/       \*/    ____      \*/       \*/       \*/            \*/        \*/
    |         |     |  |       |         |         |              |          |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^															 
art by Denis Rabusseau, [email protected]

Introduction

If you ever developed an iOS app, you most likely had to deal with the tedious tasks of manually building, packaging, checking in, tagging, and distributing your iOS application to your testers through testflightapp.com.

If you haven’t, i would highly recommend you do this, at least once, manually! Then you would truly be able to appreciate this gem.

This gem is going to make your life much easier, hopefully. Here is what it does:

  1. Reads your Xcode project file to determine your app version and build number

  2. Optionally, commits all your changes to the git repository (by, first, asking you about what has changed)

  3. Builds your project (or workspace)

  4. Packages your application into an IPA file

  5. Uploads the IPA file to testflightapp.com

  6. Optinally, tags your project with the version and the build

  7. Optionally, increments your app build number and commits it to the repo

  8. Keeps a log of all your deployments to testflightapp.com in a FLIGHTLOG file

All that with a simple command:

$ testflight takeoff

Installation

gem install testflight

if you are using rbenv, you might need to run:

$ rbenv rehash

Configuration

              _______                                                                 
              \=====/                                                                
                |||                                                                   
                 #                                                                    
                 |                                                                    
    ---------------------------                                                       
    |  www.testflightapp.com  |                                                       
    ---------------------------
    \        |       |        /                                                      
     \       |       |       /                                                       
      \      |       |      /                                                        
       \     |       |     /                                                         
        ###################                                                           
        ||               ||                                                           
        ||               ||                                                           
        ||               ||                                                           
        ||               ||                                                           
        ||               ||                                                           
        ||               ||          ___                                              
        ||               ||           | \______________                              
        ||  ####         ||          ====( oooooooooo  O\__                          
        ||  #  #         ||           (________/=====>______)--                       
        ||  #  #         ||                     OO        O                           
--------------------------------------------------------------------------------

To setup your project with the deployment script, run the following command from within your Xcode project folder:

$ testflight checkin

This command will ask you a few questions about your project, which will result in creation of .tesflight file in your project folder.

If you don’t like being asked questions and prefer to configure your project manually, just create a .tesflight file yourself and provide the following information:

build:
  developer_name:     "My Company Inc"     # Must match your company name as it appears in your .cer from Apple
  increment_bundle:   true                 # Increments your build number
  architecture:       armv7
  configuration:      Release              # In Xcode 5, it must be set to Release
  sdk:                iphoneos
git:
  commit_changes:     true                 # If you want to commit changes before each build 
  tag_build:          true                 # Will tag each build in git
testflight: 
  api_token:          "abcdefghijklmnop"   # Get it from https://testflightapp.com/account/#api
  team_token:         "abcdefghijklmnop"   # Get it from https://testflightapp.com/dashboard/team/edit/
  distribution_lists: ["Developers", "Testers", "Everyone"]  # Configure your lists at https://testflightapp.com

Execution

Once you have checked in (which is done only once per project), you are ready for takeoff.

Go to your project folder and simply type:

$ testflight takeoff

Have a safe flight!

                                                            ___.----.____         
                                                     __,--(_,-'       ,-'         
                                                 _,-'               ,-'           
                                             _,-'   ()           ,-'              
                                          ,-'    ()           ,-'                 
                                       ,-'    ()           ,-'                    
                                    ,-'  __..--''       ,-'                       
                                 ,-'.--''   ,-'      ,-'                          
              |\         __..--''        ,-'      ,-':                           
              | \__..--''     ______  ,-'     _,-'   :                           
         __..--''         ,-'\_____/-'    _,-'       :                           
__..--''               ,-' ,-'  ,-'   _,-'____/      :                            
`---...___          ,-' ,-'  ,-'  _,-'    _,-'       :                            
          ``````-,-' ,-'  ,-' _,-'    _,-'           :                            
                 \,-'___,-'--''___,-'-...___         :                           
                                             ```---..:

Authors

Michael Berkovich

Contribution

Clone the repository, make any changes you like and send me a pull request.