AppStoreReads class

A read-only App Store Connect session for one app on one platform.

One session per platform, because that is how App Store Connect answers: builds and versions are per-platform, and an iOS and a macOS build of the same commit carry the same build number, so a query that does not name the platform cannot tell them apart.

final reads = await AppStoreReads.open(
  bundleId: 'design.codeux.example',
  platform: AscPlatform.ios,
);
try {
  final builds = await reads.builds();
  for (final line in builds.lines) {
    log.writeln(line);
  }
  print(builds.newestBuildNumber);
} finally {
  reads.close();
}

Credentials come from the environment cux_ship secrets exec sets up — APPLE_API_KEY_ID, APPLE_API_ISSUER_ID and APPLE_API_PRIVATE_KEY_PATH. In-process reads therefore need those variables in the calling process, which is the one thing a caller switching from a spawned cux_ship to this has to arrange.

Properties

appId String
App Store Connect's own id for the app, as appstore prints it.
no setter
appName String
The app's name in App Store Connect.
no setter
bundleId String
The bundle id this session resolved.
no setter
hashCode int
The hash code for this object.
no setterinherited
platform AscPlatform
The platform this session was opened for.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

awaitBuild(String buildNumber, {Duration timeout = const Duration(minutes: 45), Duration poll = const Duration(seconds: 30), void onProgress(BuildProcessingProgress progress)?}) Future<AppStoreBuild>
Waits until Apple has finished processing buildNumber.
builds() Future<AppStoreBuilds>
What cux_ship appstore builds reads.
close() → void
Releases the HTTP client. A session that is not closed keeps a connection pool alive, which is what stops a long-running process from exiting.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
versions() Future<AppStoreVersions>
What cux_ship appstore versions reads.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

open({required String bundleId, required AscPlatform platform}) Future<AppStoreReads>
Resolves bundleId and holds the session open.