0.0.2 • Published 8 months ago

@appcircle/react-native-code-push v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Appcircle React Native CodePush SDK

Overview

Appcircle React Native CodePush SDK enables you to deploy mobile app updates directly to your users' devices through Appcircle's CI/CD platform. This integration allows you to automate your deployment process and manage your app updates efficiently.

Features

  • Appcircle Integration: Seamless integration with Appcircle CI/CD platform
  • Automated Deployments: Automatic deployment of updates through Appcircle workflows
  • Instant Updates: Deploy updates to your users' devices instantly
  • Rollback Support: Automatically rollback to previous versions if issues occur
  • Differential Updates: Only download the files that have changed
  • Multi-Platform Support: Works with iOS, Android, and Windows
  • TypeScript Support: Full TypeScript definitions included

Installation

Run the following command to add the Appcircle CodePush SDK to your project.

npm install @appcircle/react-native-code-push

Platform Setup

iOS Setup

  1. Add the following to your Podfile:
pod 'CodePush', :path => '../node_modules/@appcircle/react-native-code-push'
  1. Run pod install in the iOS directory

Android Setup

  1. Add the following to your android/settings.gradle:
include ':appcircle-react-native-code-push'
project(':appcircle-react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/@appcircle/react-native-code-push/android/app')
  1. Add the following to your android/app/build.gradle:
dependencies {
    implementation project(':appcircle-react-native-code-push')
}

Basic Usage

JavaScript Integration

import codePush from "@appcircle/react-native-code-push";

// For class components
class MyApp extends Component {
  // Your component code
}
MyApp = codePush(MyApp);

// For functional components
const MyApp = () => {
  // Your component code
}
export default codePush(MyApp);

Configuration Options

let codePushOptions = { 
  checkFrequency: codePush.CheckFrequency.ON_APP_RESUME 
};

// Apply options
MyApp = codePush(codePushOptions)(MyApp);

Releasing Updates

Manual Release

Use the Appcircle CLI to release updates:

# Basic release
appcircle-code-push release-react -a <AppName>/<Deployment Name>

# Release with specific options
appcircle-code-push release-react -a <AppName>/<DeplymentName> -m --description "Update description"

The release-react command enables such a simple workflow because it provides many sensible defaults (like generating a release bundle, assuming your app's entry file on iOS is either index.ios.js or index.js). However, all of these defaults can be customized to allow incremental flexibility as necessary, which makes it a good fit for most scenarios.

Automated Release

For Appcircle CodePush release automation, please visit the Appcircle CodePush workflow step documentation.

Multi-Deployment Testing

The SDK supports multiple deployment environments through Appcircle:

  • Staging: For testing updates before production
  • Production: For end-user updates
  • Custom Deployments: For A/B testing or specific user groups

Contributing

This project has adopted the Microsoft Open Source Code of Conduct.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support with Appcircle integration:

0.0.2

8 months ago

0.0.2-alpha.5

8 months ago

0.0.2-alpha.4

8 months ago

0.0.2-alpha.3

9 months ago

0.0.2-alpha.2

9 months ago

0.0.2-alpha.1

9 months ago

0.0.1

10 months ago

0.0.1-alpha.1

10 months ago