11

I have script in Xcode, which runs automatically at the end of Archive operation. It's signing and submitting build to TestFlight service. The problem is that uploading takes a lot of time, and I can't see any progress.

As a notifier it is using apple script notifier:

notify () {
    /usr/bin/osascript -e "display notification \"$1\" with title \"Xcode\""
}
notify "Uploading to TestFlight"

cURL uploading is done here:

/usr/bin/curl "http://testflightapp.com/api/builds.json" \
-F file=@"/tmp/${PRODUCT_NAME}.ipa" \
-F dsym=@"/tmp/${PRODUCT_NAME}.dSYM.zip" \
-F api_token="${API_TOKEN}" \
-F team_token="${TEAM_TOKEN}" \
-F notes="Build uploaded automatically from Xcode."

I would be happy if I can see similar messages about 10, 20, etc... percents of uploading process.

Here is full script: https://gist.github.com/ealeksandrov/5808692

Evgeny Aleksandrov
  • 780
  • 14
  • 32
  • Possible duplicate of [cURL: How to display progress information while uploading?](https://stackoverflow.com/questions/9973056/curl-how-to-display-progress-information-while-uploading) – slm Jun 09 '17 at 03:08

1 Answers1

15

Redirect the output somewhere and the progress bar will show up. The reason it is shut off in your case is that you've asked curl to send the downloaded data to stdout and then it shuts off the progress meter automatically to not mess up the output.

So, redirect with > in the shell or use one of curl's -o (lower case letter o) or -O (upper case letter o) options.

Daniel Stenberg
  • 54,736
  • 17
  • 146
  • 222