iTunes Application Loader - automation

In order to see what Applescript commands any application supports, then you need to look at the Dictionary for the application. From my answer to a similar question posted just the other day:

To get to an application's Dictionary in the the Applescript Editor go to File > Open Dictionary.... A list of all the applications that the OS knows supports Applescript will appear, but the OS won't catch them all so you can use the Browse button. If an application doesn't support Applescript, then it won't be selectable in the dialog window.

The caveat to this is that there are certain commands that an application is supposed to support but don't, or an application may only support the minimum requirements. These are all very, very simple like open, quit, etc. Your mileage may vary.

Information to start with GUI scripting can be found on the OS X Automation site. GUI Scripting is a funky way to go, and I don't think you can get the values of onscreen controls, instead only set them. You should only do this if no other avenue works.

If you wish to stick with Python, then you can look at the py-appscript project, but this is still dependent on Applescript support of the application.


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.