Skip to content

Structure

GooglePlayUploadService

Orchestrates the Google Play edit → upload → track → commit workflow.

struct GooglePlayUploadService

Overview

This mirrors the transactional model required by the Play Developer API v3: all changes must be made within an edit session and committed atomically.

Workflow

1. POST /edits               → create edit (editId)
2. POST /edits/{id}/bundles  → upload AAB
   or POST /edits/{id}/apks  → upload APK
3. PUT  /edits/{id}/tracks   → assign version codes to a track
4. POST /edits/{id}:commit   → commit changes

Usage

let client = try GooglePlayClient(serviceAccountJSONPath: "./service-account.json")
let uploader = GooglePlayUploadService(client: client, packageName: "com.example.app")
let result = try await uploader.uploadAndRelease(
    aabPath: "./build/app-release.aab",
    track: "internal",
    releaseNotes: [GooglePlayReleaseNote(language: "en-US", text: "Bug fixes")],
    status: .completed
)

Topics

Initializers

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype