Giter Site home page Giter Site logo

pavel401 / codepush-demo-flutter Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 49 KB

Medium

Home Page: https://medium.com/@mabud_alam/code-push-for-flutter-update-your-app-without-a-new-release-using-shorebird-b6f4de672481

Kotlin 1.95% Ruby 21.83% Swift 10.64% Objective-C 0.59% Dart 65.00%
codepush flutter shorebird

codepush-demo-flutter's Introduction

Code Push for Flutter: Update Your App Without a New Release using Shorebird

Introduction

Code Push is a revolutionary technique that empowers developers to deliver new code, assets, and even UI changes directly to a running app. Unlike traditional updates that necessitate users to download complete new versions from app stores, Code Push selectively updates only the required components, thereby minimizing disruptions instantly.

Advantages of Code Push Technology

  1. Faster Updates: With CodePush, developers can swiftly roll out code updates without undergoing the time-consuming app store approval process. This results in expedited delivery of bug fixes, enhancements, and new features to users.

  2. Immediate Bug Fixes: Critical bugs discovered post-app publication can be promptly rectified and deployed using CodePush, minimizing user inconvenience.

  3. Reduced User Friction: Users are no longer required to manually update their apps from app stores, enhancing user experience and promoting the adoption of the latest app version.

  4. Hot Fixes: For urgent matters such as security vulnerabilities or major bugs, CodePush empowers developers to release fixes instantly, bypassing the need for app store approval.

Shorebird: A Cloud Service for Seamless Updates

Shorebird is a pioneering cloud service that enables developers to effortlessly push app updates directly to users' devices. It was founded by prominent contributors to the Flutter world:

  • Eric Seidel: Founder of Flutter & former Director of Engineering for Flutter/Dart at Google.
  • Felix Angelov: Creator of Bloc & Mason. Former Principle Engineer at Very Good Ventures.
  • Bryan Oltman: Former architecture lead for Google’s internal-facing enterprise Flutter team.

Shorebird Architecture

Shorebird comprises three main components:

  1. A command-line tool for building and deploying your app.
  2. A modified Flutter engine to include in your app.
  3. Servers hosting patches for your app.

For an in-depth understanding of Shorebird's architecture, refer to this page.

Demo App

A demo app has been created to illustrate the power of Shorebird and CodePush. In its initial release, basic logic and assets were added. The second release, facilitated by Shorebird, introduced the Bounce() animation on Fab Tap and a toggle for material 3. To explore the demo app, visit the GitHub repository.

Getting Started with Shorebird

Follow these steps to start utilizing Shorebird in your Flutter projects:

  1. Install Shorebird CLI:

    • For macOS/Linux, run:
      curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/shorebirdtech/install/main/install.sh -sSf | bash
      
    • For Windows, use:
      Set-ExecutionPolicy RemoteSigned -scope CurrentUser
      iwr -UseBasicParsing 'https://raw.githubusercontent.com/shorebirdtech/install/main/install.ps1' | iex
      
  2. Verify Installation: Run shorebird doctor to ensure proper setup.

  3. Create an Account: Execute the following command, follow the link in the output, and sign up with a Google account.

    shorebird doctor
    
  4. Initiate a Project: In your Flutter project's root directory, run:

    shorebird init
    

    This generates a unique app_id for your app, creates a shorebird.yaml file, and updates your pubspec.yaml to include the shorebird.yaml in the assets section.

  5. Add Internet Permission: Update your android/app/src/main/AndroidManifest.xml to include the INTERNET permission:

    <manifest ...>
        <uses-permission android:name="android.permission.INTERNET" />
        ...
    </manifest>
  6. Run Your Project: Execute:

    shorebird run
    
  7. Build and Release: Build your application with:

    shorebird release android
    

    To obtain the APK file, run:

    shorebird build apk
    
  8. Install and Patch: Install the app on your device and launch it. For code changes, use:

    shorebird patch android
    

Conclusion

Shorebird presents an innovative solution to update Flutter apps seamlessly using CodePush technology. To enhance your production apps, explore the capabilities of Shorebird at shorebird.dev.

Connect with the Author

If you found value in this article, consider giving it a star on GitHub.


codepush-demo-flutter's People

Contributors

pavel401 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.