Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Upload an ipa to testflight using altool
#!/bin/bash
set -euo pipefail
xcrun altool --upload-app --type ios --file "path/to/foo.ipa" --username "$ITC_USER" --password "$ITC_PASSWORD"
@HerrNiklasRaab
Copy link

HerrNiklasRaab commented Dec 4, 2018

This script is uploading to testflight, how can i upload to appstore?

@Khronoss
Copy link

Khronoss commented May 7, 2019

@HerrNiklasRaab Actually the binary is uploaded to iTunesConnect, which allows you to send it to TestFlight (not mandatory) AND upload it to the AppStore after sending it to Apple's review process

@MartinDelille
Copy link

MartinDelille commented Jul 13, 2019

altool is available via a shorter path: /Applications/Xcode.app/Contents/Developer/usr/bin/altool (which in fact is a symlink to /Applications/Xcode.app/Contents/Developer/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/Current/Support/altool

@keith
Copy link
Author

keith commented Jul 15, 2019

I've updated the gist with the new path, and now that I know that validating the app just to upload it is redundant

@MartinDelille
Copy link

MartinDelille commented Jul 16, 2019

Nice! Even shorter than I thought ! 👌

@praveen2917
Copy link

praveen2917 commented Apr 29, 2020

I had started to upload using altool but i pressed ctrl + z and now i am not able to upload again . Error: code -18000 (Cannot proceed with delivery: an existing transporter instance is currently uploading this package)

@keith
Copy link
Author

keith commented Apr 29, 2020

You'll need to stop the existing one, you can foreground it first https://www.gnu.org/software/bash/manual/html_node/Job-Control-Basics.html or pkill it

@nhanv
Copy link

nhanv commented Sep 28, 2020

This command can run now? I try running it and get an error: *** Error: code -22014 (Unable to validate your application. We are unable to create an authentication session.)
Sorry I just start with iOS

@keith
Copy link
Author

keith commented Sep 28, 2020

We've seen that before intermittently. You should rerun later or check your auth credentials.

@omidraha
Copy link

omidraha commented Aug 15, 2021

What are usernane and password values ?

And Where can I find them?

https://help.apple.com/app-store-connect/#/devb1c185036

@keith
Copy link
Author

keith commented Aug 15, 2021

It's the ones you login to the developer portal with

@jessicatarra
Copy link

jessicatarra commented Nov 8, 2021

Is there a way to use a script to upload to appstore?

@keith
Copy link
Author

keith commented Nov 8, 2021

This pretty much does that, it just requires you to submit it manually still (or you could use the App Store Connect API) for that piece

@khindemit
Copy link

khindemit commented Jun 10, 2022

Hey @keith thanks for the script. Do you know any command to submit uploaded ipa file for TestFlight review?

@keith
Copy link
Author

keith commented Jun 10, 2022

@khindemit you can use the App Store connect api for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment