Search code examples
macosscriptingapplescriptapp-store-connect

iTunes Application Loader - automation


Since recently Apple changed the iTunes Connect interface, and people are required to upload apps with the Application Loader.

That's nice but I need a script for automating my work.

How can an app like App Loader be automated?

I was thinking of something written in AppleScript ... but I don't know what actions it exposes (if any). Found somewhere that I could also do GUI scripting from within AppleScript, but I can't find docs on that.

What I need ... some way to trigger input actions (mouse clicks / keyboard input) and read the text from the various controls displayed.

If that would be possible in Python/Ruby it would be great, but AppleScript is fine.

OS X is version 10.6.4.

Any suggestions are appreciated.

Thanks,


Solution

  • Application Loader documentation mentions an altool which can be used for this purpose. (https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf)

    The relevant information:

    You can use altool, Application Loader’s command-line tool for validating and uploading your application binary files to the App Store.

    To validate your build before upload or to automate uploads of valid builds to the App Store, you can include altool in your continuous integration systems. altool is located in the Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/ folder. (So full path would be /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool)

    To run altool, specify one of the following at the command-line:

    $ altool --validate-app -f file -u username [-p password] [--output-format xml]

    $ altool --upload-app -f file -u username [-p password] [--output-format xml]

    Where:

    --validate-app Specifies you want to validate the specified application.

    --upload-app Specifies you want to upload the specified application.

    -f file Specifies the path and filename for the application you are validating or uploading.

    -u username Specifies your username (Apple ID).

    -p password Specifies your user password.

    --output-format [xml | normal] Specifies that you want Application Loader to return output in structured XML format or unstructured text format. By default, Application Loader returns output information in text format.