AppstoreKitFork 🔌

Gem Version

A simple Ruby gem for communicating with the App Store Connect API. Currently supported features:

  • [x] List users
  • [x] List apps
  • [x] List builds of an app
  • [x] Get build details for a specific build

Installation

Add this line to your application's Gemfile:

gem 'appstore_kit_fork'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gem 'appstore_kit_fork'

Usage

Before you can use this gem you need to set up a new key in the App Store Connect "Users and Access" section. More detailed info here: App Store Connect API documentation

First, require the gem and set up a client. The Client class has three constructor arguments:

  • issuer_id: The Issuer ID of your organisation (you can find this in App Store Connect)
  • key_id: The Key ID of the App Store Connect API key you want to use
  • private_key_file_path: The path to the *.p8 file that you downloaded as part of creating an App Store Connect API key
require 'appstore_kit_fork'

client = AppstoreKitFork::Client.new(
  '8e2f3845-63ec-4865-8be7-f7cbb3c099db',
  'E28E8EE0B4CE',
  'AuthKey_E28E8EE0B4CE.p8'
)

After initialising the client, it will generate a JWT token as described in the documentation for the App Store Connect API. It's valid for 20 minutes. Now you can use it to fetch information from the API:

# Fetches all apps in the organisation
apps = client.apps
# Fetches all builds for an app
builds = client.app_builds(app)
# Fetches build details for a build
build_details = client.build_beta_details(build)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/simba909/connector_kit.

License

The gem is available as open source under the terms of the MIT License.