Upload to iTunes Connect using altool

This nugget is for those users that work with CI (Continuous Integration or “auto builders”) or like to use command line tools a lot.

In this case, I was looking to validate my app via command line, since that’s how I work most of the time, and I was expecting to do this many times.

And so I found out about altool:

/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support

You can either verify an app:

$ altool --validate-app -u foo@bar.com -p password -t ios -f ~/coolgame.ipa

Or you can upload an app:

$ altool --upload-app -u foo@bar.com -p password -t ios -f ~/coolgame.ipa

In either case, the tool will let you know of most issues locally, and it will return an exit code of non-zero, which is good for your CI jobs.

15 Likes