Question

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

Creating a new app involves just changing the values in the .plist file and rebuilding the app, and finally submitting it to the App Store. 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 the command line interface.

  2. Upload the binary and other required files/information (app icon, description, etc.) to iTunes Connect.

Any pointers where I should look?

Was it helpful?

Solution

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.

OTHER TIPS

It's 2016, and now we have the iTunesConnect Transporter command line tool with a quick start guide here.

Also, have a look at this OSS project that wraps the Transporter tools (and others) in a friendly way:

https://fastlane.tools

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top