Skip to content

Instantly share code, notes, and snippets.

@CartBlanche
Created January 22, 2014 15:02
Show Gist options
  • Save CartBlanche/8560196 to your computer and use it in GitHub Desktop.
Save CartBlanche/8560196 to your computer and use it in GitHub Desktop.
Custom commands to upload to TestFlight.
Add these inside the Adhoc|iPhone block in your csproj and change the fields withing the square brackets [], so values that are relvant to your TestFlight account.
<CustomCommands>
<CustomCommands>
<Command type="BeforeBuild" command="rm -rf ${ProjectDir}/bin/${ProjectConfigPlat}/${ProjectConfigName}/Payload/${ProjectName}.app/" />
<Command type="BeforeBuild" command="rm -rf ${ProjectDir}/bin/${ProjectConfigPlat}/${ProjectConfigName}/${ProjectName}.ipa" />
<Command type="AfterBuild" command="cp -r ${ProjectDir}/bin/${ProjectConfigPlat}/${ProjectConfigName}/${ProjectName}.app ${ProjectDir}/bin/${ProjectConfigPlat}/${ProjectConfigName}/Payload/${ProjectName}.app" />
<Command type="AfterBuild" command="zip -r ${ProjectName}.ipa Payload/ -x &quot;*.DS_Store&quot;" workingdir="${ProjectDir}/bin/${ProjectConfigPlat}/${ProjectConfigName}/" />
<Command type="AfterBuild" command="curl http://testflightapp.com/api/builds.json -F file=@${ProjectName}.ipa -F api_token='[API_TOKEN_HERE]' -F team_token='[TEAM_TOKEN_HERE]' -F notes='[TESTER_NOTES_HERE]' -F notify=true -F distribution_lists='[Test List Name Here]'" workingdir="${ProjectDir}/bin/${ProjectConfigPlat}/${ProjectConfigName}/" />
</CustomCommands>
</CustomCommands>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment