Real-Dev-Squad / mobile-app

The main app for our organization
MIT License
15 stars 39 forks source link

Implement Codepush in our RN app #185

Closed shreya-mishra closed 3 months ago

shreya-mishra commented 1 year ago

Implement CodePush for over-the-air updates. CodePush is a service provided by Microsoft App Center that allows us to deploy updates to our React Native app without requiring users to download a new version from the app store.

By implementing CodePush, we can easily push updates to our app and ensure that users have access to the latest features, bug fixes, and improvements. This will significantly reduce the turnaround time for releasing updates and provide a seamless experience to our users.

To achieve this, you may follow the steps mentioned below:

  1. Set up CodePush in the React Native project by installing the CodePush CLI globally.
  2. Initialize CodePush in the project's root directory.
  3. Link the CodePush SDK with the React Native project.
  4. Programmatically create an issue ticket on GitHub using the GitHub API, providing the release title and description.
  5. Configure the build pipeline to create a GitHub issue automatically whenever a CodePush release is triggered.
  6. Test the CodePush implementation to ensure that updates are delivered successfully to the app.

    I believe implementing CodePush will greatly benefit our development and release process, for any further queries connect with me!

shreya-mishra commented 1 year ago

@sahsisunny let me know the ETA of the RFC which we discussed.

sahsisunny commented 1 year ago

Title: Implement CodePush using AppCenter CLI

Status: Proposed

Abstract: This RFC proposes the implementation of CodePush using AppCenter CLI in the Real Dev Squad mobile app to enable over-the-air updates.

Motivation: The implementation of CodePush in the Real Dev Squad mobile app will allow us to deliver updates to users without requiring them to manually download and install a new version from an app store. This will improve user experience and make it easier to roll out bug fixes, feature enhancements, and other updates.

Specification: The proposed implementation involves following these steps:

  1. Set up a CodePush account by creating one on the AppCenter website: https://appcenter.ms/ and noting down the account details.
  2. Configure the mobile app project by installing the AppCenter CLI: https://docs.microsoft.com/en-us/appcenter/cli/ and logging in to the CodePush account.
  3. Integrate the CodePush SDK into the React Native app.
  4. Initialize CodePush in the app's entry file by importing the @appcenter/react-native-code-push package and wrapping the app component with the CodePushProvider component.
  5. Configure CodePush deployment keys by generating them using the AppCenter CLI and adding them to the appropriate configuration files (e.g., AndroidManifest.xml for Android).
  6. Upload the app's initial release to the CodePush server by building the app for release and creating a release using the AppCenter CLI.
  7. Deploy updates by creating new releases whenever updates are needed, using the AppCenter CLI.

Rationale: Implementing CodePush will streamline the process of delivering updates to the Real Dev Squad mobile app. It will reduce the dependency on app store updates, allowing us to release bug fixes and feature updates more efficiently. We can ensure a faster and smoother user experience by enabling over-the-air updates.

Implications:

The implementation of CodePush will bring several benefits, including:

  1. Faster distribution of bug fixes and feature updates to users.
  2. Reduction in-app update friction, as users will not need to manually download and install updates.
  3. Improved user experience by providing timely updates and addressing issues promptly.
  4. Simplified release management, as updates can be deployed remotely without requiring users to download a new version from app stores.

Security Considerations:

When implementing CodePush, it's essential to consider security considerations, such as:

  1. Ensuring that only authorized individuals have access to the CodePush account and deployment keys.
  2. Verifying the integrity and authenticity of the updates pushed via CodePush to prevent unauthorized modifications.
  3. Following best practices for secure code signing and encryption of sensitive data within the app.

Steps to Implementation:

  1. Create a CodePush account on the AppCenter website.
  2. Install the AppCenter CLI.
  3. Log in to the CodePush account using the AppCenter CLI.
  4. Integrate the CodePush SDK into the React Native app.
  5. Initialize CodePush in the app's entry file.
  6. Generate CodePush deployment keys using the AppCenter CLI.
  7. Add the deployment keys to the appropriate configuration files.
  8. Upload the app's initial release to the CodePush server.
  9. Deploy updates using the AppCenter CLI.

References:

sahsisunny commented 1 year ago

Steps to Implementation of CodePush using AppCenter CLI

1. Create a CodePush account on the AppCenter website.

2. Install the AppCenter CLI.

yarn global add appcenter-cli
appcenter -v

3. Log in to the CodePush account using the AppCenter CLI.

appcenter login
appcenter profile list

4. Integrate the CodePush SDK into the React Native app.