Skip to content

Add a React Native App

Requirements

Before getting started with CodePushGo, make sure you have:

Guided setup

  1. Open the console at https://console.codepushgo.com/app/home.

  2. Log in with the CLI from your React Native project folder.

    Terminal window
    npx @codepushgo/cli@latest login
  3. Connect the app. By default the CLI detects the native app identity from Expo config, iOS PRODUCT_BUNDLE_IDENTIFIER, or Android applicationId.

    Terminal window
    npx @codepushgo/cli@latest init
  4. Install the updater client.

    Terminal window
    npm install @codepushgo/react-native-updater
  5. Deploy a live update.

Manual setup

Use manual setup only when the CLI cannot infer the app identity.

  1. Create or update the app using its native bundle ID.

    Terminal window
    npx @codepushgo/cli@latest app add com.example.app --name "Example App"
  2. Create a local config file.

    {
    "appId": "com.example.app",
    "channel": "production",
    "endpoint": "https://api.codepushgo.com"
    }
  3. 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' })
  4. Upload your first release.

    Terminal window
    npx @codepushgo/cli@latest release --platform ios --version 1.0.1 --channel production