If you are like me and have an app available in versions for iPad, iPhone, and Mac, you know how tedious it is to create promo codes for the whole suite of apps. There needed to be a better way to quickly create a promo code for each app than the endless clicking and waiting game in iTunes Connect.
Update May 26th, 2015: itc.cli does not work anymore. Please use codes from the fastlane toolchain instead.
itc.cli to the rescue! With the “iTunes Connect command line interface” it’s really easy to write a script that quickly generates a set of App Store promo codes.
First, we need to install itc.cli. The installation instructions on itc.cli’s GitHub page didn’t really work for me. Here’s what I did:
1 2 3 4 5 6
If you later want to upgrade itc.cli, do this:
Script to generate promo codes for three apps at once
Now, it’s very easy to write a script that downloads one promo code for each app. You just need to know your iTunes Connect login and the Apple IDs of your apps. itc.cli lists all apps and their Apple IDs when you log in. Here’s a (slightly modified) example output:
1 2 3 4 5 6 7
With this information, I could write this script:
1 2 3 4 5 6
Now you can just double-click on the
textastic_promo_all.command file in Finder, enter your iTunes Connect password and it will automatically append three promo codes to a file called
promocodes.txt - ready to send in an email.