Experience seamless production updates with Shorebird in Flutter
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 publishing updates to the stores, streamlining the development process and reducing unnecessary delays. This allows you to update your Flutter app instantly over the air, without going through the store update process and directly deploy fixes and new features to your end users’ devices. Interesting? continue.
Getting started
You can install Shorebird on your machine using the command line with the following command below.
curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/shorebirdtech/install/main/install.sh -sSf | bash (Mac/Linux)
Set-ExecutionPolicy RemoteSigned -scope CurrentUser # Needed to execute remote scripts iwr -UseBasicParsing 'https://raw.githubusercontent.com/shorebirdtech/install/main/install.ps1'|iex (windows)
shorebird init
This command configures your Flutter project to use Shorebird and creates a shorebird.yaml
file which contains an app_id and uniquely Identifies your app during code push. Refer to the image below.
shorebird release android/ ios
To start pushing updates, you will need to create a release. This command creates a production-ready release of your app and submits your app to Shorebird and by default, it creates an app bundle (.aab)
. You can also add the Flutter version you are currently running with shorebird release android --flutter-version=3.19.0 or shorebird release ios --flutter-version=3.19.0.
where 3.19.0 is the version of Flutter you are currently running on your machine.
shorebird preview
You can preview your release on your physical device (android/ios) or emulator with shorebird preview
This will show your changes and in my case, as seen in the image above I can check the reset password feature and ready to roll it out.
shorebird patch
Once you have published a release of your app, you can push updates using one of the shorebird patch
commands. i.e shorebird patch android or shorebird patch ios.
This command does the following:
Builds the artifacts for the update.
Downloads the corresponding release artifacts.
Generates a patch using the diff between the release and the current changes.
Uploads the patch artifacts to the Shorebird backend.
Promotes the patch to the stable channel.
That’s it! Your users will see the update the next time they restart your app.
Conclusion
In this article, we explored using a code push for flutter (shorebird)
and how to add it to your Flutter project, create releases, preview changes, and create a patch for end users. For more about Shorebird visit https://docs.shorebird.dev/overview/
Subscribe to my newsletter
Read articles from Nicholas directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Nicholas
Nicholas
Hello, I am a senior Flutter developer with vast experience in crafting mobile applications. I am a seasoned community organizer with vast experience in launching and building Google Developer communities under GDG Bugiri Uganda and Flutter Kampala.