Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Command upload App/Ipa to the iTunes Connect App Store
set -ex
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status
# Requires application loader to be installed
# See
# Itunes Connect username & password
# App id as in itunes store create, not in your developer account
MD5=$(md5 -q $IPA_FILE)
BYTESIZE=$(stat -f "%z" $IPA_FILE)
# Remove previous temp
test -d ${TEMPDIR} && rm -rf ${TEMPDIR}
mkdir ${TEMPDIR}
mkdir ${TEMPDIR}/mybundle.itmsp
# You can see this debug info when you manually do an app upload with the Application Loader
# It's when you click activity
cat <<EOM > ${TEMPDIR}/mybundle.itmsp/metadata.xml
<?xml version="1.0" encoding="UTF-8"?>
<package version="software4.7" xmlns="">
<software_assets apple_id="$APP_ID">
<asset type="bundle">
<checksum type="md5">$MD5</checksum>
cp ${IPA_FILE} $TEMPDIR/mybundle.itsmp
/Applications/\ -m upload -f ${TEMPDIR} -u "$USER" -p "$PASS" -v detailed

ghost commented Sep 23, 2014

line 45 has a typo
cp ${IPA_FILE} $TEMPDIR/mybundle.itmsp

Thank you!

devios1 commented Mar 27, 2015

Second that! Note that you have a typo on line 45: it should be mybundle.itmsp, not .itsmp.

AlonShm commented May 23, 2015

Any idea how to add the metadata also?

dmi3j commented Jun 30, 2015

I have Xcode 6.3.2 and location for iTMSTransporter is different. Now it's:


So, line 47 could be changed accordingly.

plischer commented Jul 7, 2015

Is there a way to add metadata for uploading your app with debug symbols?

devios1 commented Dec 1, 2015

Any idea how software_assets fits into the new software5.4 specification? There is now package/software/software_metadata at the root.

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