AppleDeveloper

Elixir client for the App Store Connect API.

It covers the provisioning and App Store Connect surfaces that are most useful in automation scripts and internal tools:

Installation

Add to your mix.exs:

defp deps do
  [
    {:apple_developer, "~> 0.1.0"}
  ]
end

Configuration

config :apple_developer,
  issuer_id: System.get_env("APPLE_DEVELOPER_ISSUER_ID"),
  key_id: System.get_env("APPLE_DEVELOPER_KEY_ID"),
  private_key_path: System.get_env("APPLE_DEVELOPER_PRIVATE_KEY_PATH")

Supported options:

Every public function accepts per-call overrides.

Quick Start

# Access token
{:ok, token} = AppleDeveloper.token()

# Apps
{:ok, apps} = AppleDeveloper.list_apps(limit: 5)

# Certificates
{:ok, certs} = AppleDeveloper.list_certificates(filter_status: "ACTIVE")

# Devices
{:ok, devices} = AppleDeveloper.list_devices(filter_platform: "IOS")

# Profiles
{:ok, profiles} = AppleDeveloper.list_profiles(filter_profile_state: "ACTIVE")

Common Operations

# Register a device
AppleDeveloper.register_device(
  "QA iPhone",
  "00008110-001234567890ABCDE",
  "IOS"
)

# Create a development certificate
AppleDeveloper.create_certificate(:ios_development, csr_pem)

# Create a provisioning profile
AppleDeveloper.create_profile(
  "My Development Profile",
  "IOS_APP_DEVELOPMENT",
  bundle_id_id,
  [certificate_id],
  [device_id]
)

Live Testing

A live smoke test is included:

cd apple_developer
elixir test_live.exs

That script verifies token generation and makes a real list_apps call.

Errors

API calls return {:ok, result} or {:error, reason}.

HTTP failures are wrapped in AppleDeveloper.Error.

Typical statuses:

Notes

License

MIT