Add a React Native App
Requirements
Before getting started with CodePushGo, make sure you have:
- A React Native app with an iOS bundle identifier or Android application ID
- Node.js 18 or later
- A CodePushGo account at https://codepushgo.com/register/
Guided setup
-
Open the console at https://console.codepushgo.com/app/home.
-
Log in with the CLI from your React Native project folder.
Terminal window npx @codepushgo/cli@latest login -
Connect the app. By default the CLI detects the native app identity from Expo config, iOS
PRODUCT_BUNDLE_IDENTIFIER, or AndroidapplicationId.Terminal window npx @codepushgo/cli@latest init -
Install the updater client.
Terminal window npm install @codepushgo/react-native-updater -
Deploy a live update.
Deploy a live update Build and upload your first React Native JavaScript bundle.
Manual setup
Use manual setup only when the CLI cannot infer the app identity.
-
Create or update the app using its native bundle ID.
Terminal window npx @codepushgo/cli@latest app add com.example.app --name "Example App" -
Create a local config file.
{"appId": "com.example.app","channel": "production","endpoint": "https://api.codepushgo.com"} -
Configure the JavaScript updater in your app startup code.
import { configureCodePushGo, startCodePushGo } from '@codepushgo/react-native-updater'configureCodePushGo({ endpoint: 'https://api.codepushgo.com' })await startCodePushGo({ defaultChannel: 'production' }) -
Upload your first release.
Terminal window npx @codepushgo/cli@latest release --platform ios --version 1.0.1 --channel production