Skip to content

Structure

FirebaseAppDistributionClient

JWT-authenticated HTTP client for the Firebase App Distribution API (v1).

struct FirebaseAppDistributionClient

Overview

Mirrors GooglePlayClient in structure and usage patterns, but requests the cloud-platform OAuth scope that the App Distribution API accepts.

Authentication

Two supported paths:

  • A Google Cloud service-account key via the OAuth2 service-account JWT flow (RS256). Credentials are supplied as raw JSON or a path on disk — never inline in a Shipfile.

  • Workload Identity Federation (see WorkloadIdentityFederationClient), which exchanges a GitHub Actions OIDC token for short-lived credentials with no key ever created. Required wherever an org enforces the iam.disableServiceAccountKeyCreation policy.

Usage

Callers normally reach this through FirebaseAppDistributionAction rather than directly:

let client = try FirebaseAppDistributionClient(serviceAccountJSONPath: "/path/to/key.json")
let appID = try FirebaseAppID("1:1234567890:ios:abc123")
let operation = try await client.uploadRelease(
    appID: appID, fileName: "App.ipa", data: artifactData)
let response = try await client.pollUpload(operationName: operation)
try await client.distribute(
    releaseName: response.release.name, groups: ["qa-testers"], testers: [])

Topics

Initializers

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype