Skip to content

Instantly share code, notes, and snippets.

@huishannetaporter
Created August 1, 2019 09:23
Show Gist options
  • Save huishannetaporter/95d0175393f59ca7d3f5bb564acb906f to your computer and use it in GitHub Desktop.
Save huishannetaporter/95d0175393f59ca7d3f5bb564acb906f to your computer and use it in GitHub Desktop.
finishedScript.sh
# Create the .itmsp folder
mkdir <path to your .itmsp folder>/<name of your .itmsp folder>.itmsp
# Move your .ipa file into the .itmsp folder
cp <path to where your .ipa file is stored> <path to your .itmsp folder>/<name of your .itmsp folder >.itmsp
# Generate the metadata.xml file
fileSize=` stat -f %z <Your .ipa file>`
md5Checksum=`md5 <Your .ipa file> | cut -d "=" -f 2 | awk '{print $1}'`
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > <path to your .itmsp folder>/metadata.xml
echo "<package xmlns=\"http://apple.com/itunes/importer\" version=\"software5.4\">" >> <path to your .itmsp folder>/metadata.xml
echo " <software_assets apple_id=\"<Your Apple ID>\" app_platform=\"ios\">" >> <path to your .itmsp folder>/metadata.xml
echo " <asset type=\"bundle\">" >> <path to your .itmsp folder>/metadata.xml
echo " <data_file>" >> metadata.xml
echo " <size>$fileSize</size>" >> <path to your .itmsp folder>/metadata.xml
echo " <file_name>nap.ipa</file_name>" >> <path to your .itmsp folder>/metadata.xml
echo " <checksum type=\"md5\">$md5Checksum</checksum>" >> <path to your .itmsp folder>/metadata.xml
echo " </data_file>" >> <path to your .itmsp folder>/metadata.xml
echo " </asset>" >> <path to your .itmsp folder>/metadata.xml
echo " </software_assets>" >> <path to your .itmsp folder>/metadata.xml
echo "</package>" >> <path to your .itmsp folder>/metadata.xml
# Upload the .itmsp folder to iTunes Connect
/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter -m upload -u <Your username>
-p <Your password> -f <Location of the .itmsp file> -t DAV -t Signiant -k 100000 -v eXtreme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment