Autoindigestion is a command line tool for Mac OS X that downloads all available sales reports from iTunes Connect. It uses the Auto-Ingest tool supplied by Apple to download individual reports.
Autoindigestion can be configured to work with multiple iTunes Connect vendors. When Autoindigestion runs, it will look for vendor files, which are standard XML plists that contain vendor information, including iTunes Connect sign in credentials. For security, it is recommended that each vendor create a separate iTunes Connect user limited to the Sales role for use with Autoindigestion.
Autoindigestion is available under a BSD-style open source license. See the LICENSE file for details.
Autoindigestion is developed on Mac OS X 10.8 Mountain Lion using Xcode 5.0. It is a modern Objective-C command line tool. The current distribution is source only, so a Mac running Mountain Lion with Xcode installed is required. The Xcode project now includes a target for building a standard Mac installer package. (A pre-built, signed installer package is planned for the future.)
Autoindigestion also depends on Apple's Auto-Ingest tool, a Java class available from Apple at http://www.apple.com/itunesnews/docs/Autoingestion.class.zip. The installer package will automatically download the latest version of the Auto-Ingest tool from Apple. Java is needed to run the Auto-Ingest tool, but is no longer installed on Mac OS X by default. You can download the latest Java installer from Apple at http://support.apple.com/downloads/#Java.
After downloading the source, open
Autoindigestion.xcodeproj in Xcode then
build the installer package by selecting the Installer scheme in the
Product | Scheme menu, then choosing Product | Build or Product | Run.
If you run the Installer scheme from Xcode, the Autoindigestion installer will
launch automatically after it is built. To locate the installer package file,
right click on the
Autoindigestion.pkg entry in the Xcode project and select
Show in Finder.
Manual Installation and Removal
The Autoindigestion installer creates the following directories and files:
In addition, the installer creates a temporary directory named
/tmp/com.ablepear.autoindigestion.installer/ and will remove it when
installation is completed under normal circumstances.
Create at least one vendor file in
vendor filename must end in
.plist. Here is an example vendor file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>VendorName</key> <string><![CDATA[Example Inc]]></string> <key>VendorID</key> <string>81234567</string> <key>Username</key> <string><![CDATA[email@example.com]]></string> <key>Password</key> <string><![CDATA[itsasecret]]></string> </dict> </plist>
Because this is an XML file, it's recommended that you surround the vendor
name, username and password values with
]]>; alternately you
need to check these values for special XML characters
replace them with
The installer will create a similar example vendor file at
/Library/Autoindigestion/Vendors/ExampleVendor.plist. The vendor ID is
available in iTunes Connect on the "Sales and Trends" page or can be found in
an existing sales report. For security, do not use the username and
password of your iTunes Connect Admin user in the vendor file! Create a
separate iTunes Connect user limited to the Sales role for use with
Autoindigestion. For additional security, run
chmod 600 "<vendor file>" and
sudo chown root:admin "<vendor file>" on each vendor file you create.
The installer creates and loads a launchd item at
/Library/LaunchDaemons/Autoindigestion.plist that will run Autoindigestion
automatically each day. Here is a sample launchd item that runs at 8:30 AM in
the morning and again at 8:30 PM in the evening:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>Autoindigestion</string> <key>ProgramArguments</key> <array> <string>/Library/Autoindigestion/Autoindigestion</string> </array> <key>StartCalendarInterval</key> <array> <dict> <key>Hour</key> <integer>8</integer> <key>Minute</key> <integer>30</integer> </dict> <dict> <key>Hour</key> <integer>20</integer> <key>Minute</key> <integer>30</integer> </dict> </array> <key>StandardErrorPath</key> <string>/Library/Logs/Autoindigestion.log</string> <key>StandardOutPath</key> <string>/Library/Logs/Autoindigestion.log</string> </dict> </plist>
You may want to adjust the run time based on your time zone. iTunes Connect reports are usually available by 8:00 AM Cupertino time (UTC -0800 or -0700 in summer) but are occasionally delayed a few hours.
After creating or modifying the launchd item, tell launchd to load it by
sudo launchctl load /Library/LaunchDaemons/Autoindigestion.plist.
To disable Autoindigestion, run
sudo launchctl unload /Library/LaunchDaemons/Autoindigestion.plist.
Downloaded reports for each vendor will be placed in
/Users/Shared/iTunes Connect/<VendorName> respectively, where
is the value of the
VendorName key from the vendor file.
See the Autoindigestion command man page for complete details on the
Autoindigestion command. For more information on Autoindigestion
configuration files, see the Autoindigestion file formats man page.
For details on Apple's Auto-Ingest tool and complete information about the iTunes Connect report format, log into iTunes Connect, go to "Sales and Trends" and click on the "Download User Guide" link near the bottom of the page to download the "iTunes Connect Sales and Trends Guide" PDF file. Note that there are different guides for vendors of apps, music, video and books.