Skip to content

Instantly share code, notes, and snippets.

@keith
Last active November 1, 2023 12:59
  • Star 48 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save keith/5b5f61f4cc690aec403afd92aab020c3 to your computer and use it in GitHub Desktop.
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

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

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

Nice! Even shorter than I thought ! 👌

@praveen2917
Copy link

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

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

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

@gindemit
Copy link

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

@villimin
Copy link

villimin commented Feb 8, 2023

is there a way to set build version in the altool?

@MartinDelille
Copy link

@villimin I personally use a git tag for the version.

@ios-nexlab
Copy link

I've used this command but receiving the Appstore Connect's email message: "ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it."

@keith
Copy link
Author

keith commented Jul 11, 2023

I've used this command but receiving the Appstore Connect's email message: "ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it."

that sounds unrelated to this tool

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