views:

349

answers:

1

Is there an API or any other method to automate the submission process.

To elaborate: I have a number of apps which are similar in functionality and UI structure. I create the user interface by picking up variables from a plist. For instance I save the source of the API from where I pick up the data.

Creating a new app involves just changin the values in the playlist and rebuilding the app. Then submitting it to the appstore. Also I need to create Ad Hoc Provision files and build test releases too.

I wish to automate this process. For this I need to

1) build the App through command line. 2) Upload the binary and other required files/information (app icon, marketing info) to itunesConnect Portal.

Any pointers where I should look ?

+1  A: 

Building your Xcode projects can be automated by using the command line tool xcodebuild that Apple provides.

As far as automating the app creation process goes, Apple has not exposed this functionality outside of the Xcode GUI. You can still automate this and there are two options.

  1. Use Automator to create a script that replays all the actions a human would perform to create a new project. Parts of this replay script like the project name etc. can be customized and programmatically fed to the script. A disadvantage of this method is that this will actually run on the GUI and will be slow.

  2. If you want to do it all through the command line, you will have to reverse engineer the contents of the Xcode project file that has the extension .xcodeproj. It's a compressed file and contains a few XML configuration files for the entire project. There is no public documentation on the contents of these XML files.

For automating the submission process, you will need a script that talks to itunesconnect.apple.com. This is where you would submit your app to the App Store. Checkout this page for more info on iTunes Connect. A browser automation tool will be helpful here though you could roll your custom script that talks to iTunes Connect over HTTP.

To summarize, the only thing that can be used readily out of the box is the xcodebuild tool. Everything else has to be reverse engineered.

Anurag
Thanks Anurag! But I guess posting the apps to iTunesConnect would pose problems in the future. What if Apple changes the site? There must be a better way out there.
Abhinit
That's true, but it cannot be helped unless Apple opens up some sort of APIs for iTunes Connect. Among the available options a custom script is probably better than using a browser automation tool as GUI changes should not affect your script. It will break, however, if the form elements like the name attribute changes. To minimize this damage, you could put all the items required on iTunes Connect inside a XML or some other configuration file, and map it to your actual data.
Anurag