TestFlightApp Android iOS integration - n3phele/mobile-ui-enyo GitHub Wiki

TestFlightApp is a free web service for mobile cloud distributed beta versions of apps.
It has a SDK for reporting errors as well as closed circuit beta distribution - only people who are authorized by the developer can download and install the apps.
It is used by big mobile players and developers.
Apps are delivered to a specific team or authorized one by one.
Delivering beta version of the apps to TestFlightApp is really easy and can be done in 3 different ways:

  • Mac App.
  • Web interface - just create an app there, then create a team [if you want to] and upload the .ipa or .apk. If you choose not to create a team, you'll need to specify who is able to install the app and select if you want to send email notifications of this build.
  • REST API.

Using their REST API is really easy and can be done via Windows (You'll need to install cURL), Linux or Mac OS X.
Adapting to n3phele-mobile case, the iOS beta build is scheduled to run daily via Cloudbees, so what can be done is set a shell script to be run everytime a build is made.
This shell script is intent to get assign the .ipa and .dSYM files to variables and then upload it to TestFlightApp.
The .ipa file is the app executable and .dSYM is the debug symbols generated by Xcode, which is optional, but in case we have a crash log, Xcode can show more clearly where the crash occured with debug symbols.
As android doesn't use .dSYM files, you don't need this parameter in the TestFlightApp API.
You are also required to generate an API Token and Team Token for the current app to use REST calls.
It can be easily found in the TestFlightApp FAQ.
The notify parameter dictates if you want to deliver email notifications of the current build.
Distribution list is the name that you assigned to your team.
The following shell script can be used in Mac OS X to upload iOS n3phele builds and can be easily modified to run in Linux to upload Android .apk as well.

IPAFILE=( $(find . -type f -name "*.ipa") )
for item in ${IPAFILE[*]}
do
echo $IPAFILE
done
DSYMFILE=( $(find . -type f -name "*-dSYM.zip") )
for item in ${DSYMFILE[*]}
do
echo $DSYMFILE
done

curl http://testflightapp.com/api/builds.json -F file=@$IPAFILE -F dsym=@$DSYMFILE -F api_token='INSERT_API_TOKEN' -F team_token='INSERT_TEAM_TOKEN' -F notes='Latest n3phele_mobile build' -F notify=True -F distribution_lists='distribution_list_name'