Files
Tony 05ccef7e81
Deploy Artifact Proxy Dev / ☁️ Artifact Proxy (push) Has been cancelled
Deploy Discord GCP Alerts / ☁️ Discord GCP Alerts (push) Has been cancelled
ci / 📄 License Check (push) Has been cancelled
ci / ✅ Semantic Pull Request (push) Has been cancelled
ci / 🔤 Check Spelling (push) Has been cancelled
ci / 👀 Detect Changes (push) Has been cancelled
Shorebird CI / changes (push) Has been cancelled
Shorebird CI / CSpell (push) Has been cancelled
ci / 🎯 Build ${{ matrix.package }} (${{ matrix.os }}) (push) Has been cancelled
ci / 🔎 Verify ${{ matrix.package }} (push) Has been cancelled
ci / ci (push) Has been cancelled
Shorebird CI / artifact_proxy (push) Has been cancelled
Shorebird CI / dex (push) Has been cancelled
Shorebird CI / discord_gcp_alerts (push) Has been cancelled
Shorebird CI / flutter_version_resolver (push) Has been cancelled
Shorebird CI / jwt (push) Has been cancelled
Shorebird CI / scoped_deps (push) Has been cancelled
Shorebird CI / shorebird_build_trace (push) Has been cancelled
Shorebird CI / shorebird_ci (push) Has been cancelled
Shorebird CI / shorebird_cli (push) Has been cancelled
Shorebird CI / shorebird_code_push_client (push) Has been cancelled
Shorebird CI / shorebird_code_push_protocol (push) Has been cancelled
Shorebird CI / shorebird_redis_client (push) Has been cancelled
Shorebird CI / stripe_api (push) Has been cancelled
Shorebird CI / required (push) Has been cancelled
ci / 🎯 Build ${{ matrix.package }} (push) Has been cancelled
Merge remote-tracking branch 'upstream/main'
# Conflicts:
#	packages/artifact_proxy/lib/src/artifact_proxy.dart
#	packages/scoped_deps/pubspec.yaml
#	packages/shorebird_cli/pubspec.yaml
#	packages/shorebird_code_push_client/lib/src/code_push_client.dart
2026-08-03 01:58:32 +08:00
..

Shorebird CodePush Client

The Shorebird CodePush Client is a Dart library which allows Dart applications to interact with the Shorebird CodePush API.

Installing

To get started, add the library to your pubspec.yaml:

dependencies:
  shorebird_code_push_client:
    git:
      url: https://github.com/shorebirdtech/shorebird
      path: packages/shorebird_code_push_client

Usage

import 'package:shorebird_code_push_client/shorebird_code_push_client.dart';

Future<void> main() async {
  final client = CodePushClient(apiKey: '<API KEY>');

  // Download the latest engine revision.
  final engine = await client.downloadEngine('latest');

  // Create a new Shorebird application.
  await client.createApp(appId: '<APP ID>');

  // List all apps.
  final apps = await client.getApps();

  // Create a new patch.
  await client.createPatch(
    artifactPath: '<PATH TO ARTIFACT>', // e.g. 'libapp.so'
    releaseVersion: '<RELEASE VERSION>', // e.g. '1.0.0'
    appId: '<APP ID>', // e.g. 'shorebird-example'
    channel: '<CHANNEL>', // e.g. 'stable'
  );

  // Close the client.
  client.close();
}