Search code examples
apibashfile-uploadtestflight

Error submitting iOS .app using TestFlight API


I'm running the following script:

#!/bin/bash
archive=`./builds/myapp.ipa`
curl http://testflightapp.com/api/builds.json
-F file=$archive
-F api_token='xxxxxxxxxxxxxxxxxxxxxxxxxx'
-F team_token='xxxxxxxxxxxxxxxxxxxxxxxxxx'
-F notes='here comes the new app!' 
-F notify=True
-F distribution_lists='MyFriends'

but I'm getting the error:

You must supply api_token, team_token, the file and notes (missing file)

I'm actually copy/past-ing the script from the TestFlight website. What's wrong with that?


Solution

  • Please note that, as seen in the example given in the TestFlight API Documentation, you need to use the '@' character before the IPA file name.

    You should try with:

    #!/bin/bash
    archive=`./builds/myapp.ipa`
    curl http://testflightapp.com/api/builds.json \
    -F file=@$archive \
    -F api_token='xxxxxxxxxxxxxxxxxxxxxxxxxx' \
    -F team_token='xxxxxxxxxxxxxxxxxxxxxxxxxx' \
    -F notes='here comes the new app!' \
    -F notify=True \
    -F distribution_lists='MyFriends'