Skip to main content

codepush 0.3.1 copy "codepush: ^0.3.1" to clipboard
codepush: ^0.3.1 copied to clipboard

discontinued

Ship Dart fixes to installed Flutter apps without an app-store review. Signed patches, staged rollout, crash-safe rollback. Android needs no forked engine.

codepush #

Ship Dart fixes to installed Flutter iOS apps without an App Store review.

Your app gets one file and one dependency line. No main.dart changes, no native code, no asset entries.

# codepush.yaml  (written by `codepush init`)
app_id: cp_7Kq9xZ2mWv4TnR8bL3sYd6HfJp1cXa5E
# pubspec.yaml
dependencies:
  codepush: ^0.3.0

Getting started #

curl -fsSL https://cdn.trackmyrent.in/install.sh | bash   # the codepush CLI
codepush login                  # once per laptop, in the browser
codepush init                   # in your Flutter project: paste the app id
flutter pub add codepush
codepush release ios            # build the store release
# ...change Dart code...
codepush patch ios              # publish the change

Create the app (and get its id) in the CodePush panel. The CLI downloads the patched Flutter engine for your Flutter version and Mac (Apple silicon or Intel) on first use.

What a patch can change #

Dart. Not native code, not plugins, not assets, not permissions. New screens, new classes and changed logic are fine; anything native still needs a store build.

How iOS patching works #

iOS cannot load native code that was not signed into the app, so a patch is data: the release's own machine code is reused for every function that did not change, and the changed ones run as bytecode in the Dart VM's interpreter. The patched Flutter engine (downloaded by the CLI) does the loading before the first frame. Nothing executable is ever downloaded.

Every patch is signed #

The CodePush server signs each patch manifest with your app's Ed25519 key; the public half is compiled into every release. A device checks, in order: the signature, the app id, revocation, the engine, the release, the rollout and the artifact hash — so a patch altered anywhere on the way is refused.

If a patch breaks something #

A patch stays live only if the app runs healthily for a few seconds after its first frame. Two launches that fail inside that window drop the patch and the app returns to the shipped code, with no server involved.

You can also stop one everywhere:

codepush patches revoke 7 --reason "crash on the login screen"

Devices running it return to the shipped build on their next cold start.

Showing a download #

Optional, and off by default:

Stack(children: [child, const CodePushStatusStrip(bottomOffset: 92)])

It appears while a patch downloads and disappears when it is done.

Android #

The Android path is not covered by this release's testing yet; use iOS.

0
likes
0
points
720
downloads

Publisher

unverified uploader

Weekly Downloads

Ship Dart fixes to installed Flutter apps without an app-store review. Signed patches, staged rollout, crash-safe rollback. Android needs no forked engine.

Topics

#code-push #hot-update #ota #deployment

License

unknown (license)

Dependencies

codepush_protocol, crypto, dio, flutter, path_provider, shared_preferences

More

Packages that depend on codepush

Packages that implement codepush