Shorebird - Codepush for Flutter

Shorebird - Codepush for Flutter

Are you involved in Flutter mobile development? Are you looking for a faster and more efficient way to push changes to production? Don't worry, I'm here to introduce an intriguing approach that bypasses the waiting period of app store reviews.

Facing bugs in our mobile applications after publishing can be a challenging situation. Fixing the bug, creating new versions, and waiting for approval from Google Play and the App Store can be time-consuming. What's more, sometimes releases are rejected, leading to additional rounds of revisions. This scenario is all too familiar for many of us in the development community.

Fortunately, there's now a solution: Shorebird. Shorebird is a code-push solution designed specifically for Flutter, providing stability on both Android and iOS platforms. With Shorebird, you can address app issues without the need to publish updates to the stores, streamlining the development process and reducing unnecessary delays.


Integrating Shorebird is very easy and straightforward.Today I will demonstrate how Shorebird is working for Android applications.Here the easy steps

  • Installing Shorebird CLI - Open a terminal and run

curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/shorebirdtech/install/main/install.sh -sSf | bash        

  • Login to the Shorebird - You need to be login to the Shorebird for this process.

shorebird login        

  • Initialize Shorebird in your Flutter Project - Run the following command form the root of the Flutter Project

shorebird init        

After executing "shorebird init" it does three things

  1. Shorebird to create a unique "app_id" for your app.
  2. Generate a "shorebird.yaml" file in your project's root directory, which includes the "app_id".
  3. Add "shorebird.yaml" to the assets section of your "pubspec.yaml" file to ensure it's bundled with your app's assets and available to the Shorebird updater at runtime.

Here is the created "shorebird.yaml" including the "app_id"

And also If your application utilizes flavors, running 'shorebird init' will generate an app for each flavor, and the 'shorebird.yaml' file will encompass all flavors along with their respective app_ids.

?????? WE ARE ALMOST DONE.LET'S FINISH IT UP ??????


  • Creating a Release - Run the following command to create a new release.

shorebird release android        

After running this command you will get the release candidate which you can upload to the Google Play Store.

And also you can manage and track the releases for the Shorebird console : https://console.shorebird.dev/

  • Preview the release locally - You can Preview the created release build by running the following command.It will open the created release in your android emulator to verify the release candidate.

shorebird preview        


?????? HERE COMES THE MAGIC ??????

Now let's do a patch release using Shorebird.

I will do a code change in the release version to change the "App Bar color" and I going to add a new Text in the main screen.

YESSS we can do the changes and publish the changes using Shorebird.

By defaultly users will get the new patch version when they relaunch the application

??? NO NEED TO WAIT FOR THE STORE APPROVAL ???


  • Releasing the patch version - Run the following command to create and trigger the patch version

shorebird patch android        

** As you can see in the video users can easily get the new changes after reopening the android application **

By login into the https://console.shorebird.dev/ portal you can see the available release with the patch versions.From there you can have insight reports of the each patch versions.


Bones :

  • When creating patch version Shorebird will report us if there is any bugs in the new code,which help us to prevent pushing any buggy versions to the production.
  • By using https://pub.dev/packages/shorebird_code_push we can improve and customize the default behavior of the patch downloads.

Main Limitations :

  • Shorebird patches are only capable with dart code changes.If you have native code changes we can't execute Shorebird changes.
  • We can't stage roll out the changes and cannot target specific users.
  • It's works only for mobile platforms.

What Next :

  • Creating iOS builds using Shorebird.
  • Automate Shorebird process using GitHub Action.

Sources :

Huabing Liu

create something useful

10 个月

Engs will figure out in minutes how to use codepush to solve everything apart from hot fix. Who would go back to Corolla after getting Farari?

Chaththaka Lankeshwara

Head of Delivery at OmobioNG

10 个月

Thilina Warnakulasuriya how many app users support? Are there any limitations?

要查看或添加评论,请登录

社区洞察

其他会员也浏览了