Structure
GooglePlayUploadService
Orchestrates the Google Play edit → upload → track → commit workflow.
struct GooglePlayUploadServiceOverview
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 changesUsage
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
init(client: GooglePlayClient, packageName: String)Creates a
GooglePlayUploadService.
Instance Methods
func uploadAndRelease(aabPath: String?, apkPath: String?, track: String, releaseName: String?, releaseNotes: [GooglePlayReleaseNote], status: GooglePlayReleaseStatus, userFraction: Double?) async throws -> IntFull upload-and-release workflow: create edit, upload artifact, assign track, commit.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype