“Spaceship is a Ruby library that exposes the Apple Developer Center API. It’s super fast, well tested and supports all of the operations you can do via the browser. Scripting your Developer Center workflow has never been easier! ”Up until now fastlane tools made use of front-end web scraping. This means, the tools used a headless web browser to interact with the Apple Developer Portal and iTunes Connect. While this is an easy solution to get started, I quickly ran into the limits of web scraping.

More and more issues were caused by this technique: The tools were slow and the users got random timeout errors. When using web scraping, the tools would immediately break after front-end design changes of the websites.

Upgrading fastlane

It was time to implement a better solution: By replacing the headless web browser with a plain HTTP client it was possible to speed up  sigh by 90% and make it much more stable at the same time. 

This allowed us to stub all HTTP requests to write tests and detect newly introduced errors faster.

What is spaceship?

Instead of implementing the HTTP client right into the individual tools, I decided to separate the communication layer and put it into its own reusable Ruby gem. This allows every developer to make use of it. 

spaceship is like Core Data for your Dev Center resources

You don’t care about the communication and how it works. You can simply interact with Ruby objects (e.g.  App, Certificate, …) and the changes will automatically be pushed to the Dev Center.

How can I get started?

There is a pre-release version of  sigh available to try, check out the  announcement to upgrade.

If you want to try spaceship directly, check out the  spaceship Project page with a very easy to follow documentation on how to use it. You’ll have to install spaceship first before you can start  irb (Interactive Ruby Shell).

What’s next?

The plan is to migrate all  fastlane tools to make use of spaceship. In the long term, spaceship will also implement the iTunes Connect JSON API (which is already documented  on GitHub).

Special thanks to zeropush.com for sponsoring spaceship.

Visit spaceship.airforce for more details.

Open on GitHub

Unless otherwise mentioned in the post, those projects are side projects which I work on on weekends and evenings, and are not affiliated with my work or employer.