TestFlightApp.com MonoDevelop Integration

Well it’s been quite a while since I’ve done a post. Today’s post is just a repost of an old post I had on my old blog before I had some data loss issues. Someone in the IRC channel asked about it today, so here it is. The following is a except from a csproj file, showing what you need to add/change into your configuration to get MD to auto-build your app and upload to TFA.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AdHoc|iPhone' ">
    <DebugType>none</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\iPhone\AdHoc</OutputPath>
    <WarningLevel>4</WarningLevel>
    <MtouchDebug>False</MtouchDebug>
    <AssemblyName><Your Assembly Name></AssemblyName>
    <CodesignKey><Your Key Here></CodesignKey>
    <MtouchI18n />
    <CustomCommands>
      <CustomCommands>
        <Command type="BeforeBuild" command="rm -rf ${SolutionDir}/Output/Payload/${ProjectName}.app/" />
        <Command type="BeforeBuild" command="rm -rf ${SolutionDir}/${ProjectName}.ipa" />
        <Command type="AfterBuild" command="cp -r ${ProjectDir}/bin/${ProjectConfigPlat}/${ProjectConfigName}/${ProjectName}.app ${SolutionDir}/Output/Payload/${ProjectName}.app" workingdir="" />
        <Command type="AfterBuild" command="zip -r ../${ProjectName}.ipa ." workingdir="${SolutionDir}/Output/" />
        <Command type="AfterBuild" command="curl http://testflightapp.com/api/builds.json -F file=@../${ProjectName}.ipa -F api_token='<Your API Token Here>' -F team_token='<Your Team Token>' -F notes='Uploaded Automatically From MonoDevelop' -F notify=false -F distribution_lists='<Your Distribution Lists>'" />
      </CustomCommands>
    </CustomCommands>
    <CodesignProvision><Your Codesign UID></CodesignProvision>
    <MtouchUseLlvm>false</MtouchUseLlvm>
    <MtouchUseArmv7>false</MtouchUseArmv7>
    <MtouchUseThumb>false</MtouchUseThumb>
    <MtouchUseSGen>false</MtouchUseSGen>
    <MtouchArch>ARMv6</MtouchArch>
    <MtouchSdkVersion>4.3</MtouchSdkVersion>
    <MtouchMinimumOS>4.3</MtouchMinimumOS>
  </PropertyGroup>

Once you’ve made this change to your CSPROJ file, the next steps are as follows.

  1. Create an Output Directory in your solution folder
  2. Create a Payload folder inside the new Output folder
  3. Configure the upload note, and API Key and

While there is still lots of room for improvement, it should give everyone a quick idea of how to use MD’s custom build actions to automatically upload your build to TFA.

Cheers
Warren

Leave a Comment