1

We are testing the code push implementation for our ReactNative application to push js updates.

Changes Done:

  • Created App center login and connected to the github repo.
  • Deployed CodePush from my react native project using cmd

appcenter codepush release-react -a chandrasekarg/ReactNativeCodePush -d Staging

  • Modified app.js File as below

  import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
import codePush from "react-native-code-push";

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

    class App extends Component {
    render() {
        return (
          <View style={styles.container}>
            <Text style={styles.welcome}>Welcome to Code Push Test !</Text>
          </View>
        );
      }
    }
    App = codePush(codePushOptions)(App);
    export default App;

Where should i have to add the details about my AppCenter account and the Project name to look for the JS bundle.?

how to test the Code Push with Android Emulator.?

Gowthaman
  • 790
  • 1
  • 10
  • 29

1 Answers1

0

You can either hard code ur deployment key in MainActivity.java or have it loaded dynamically.

Please refer to https://learn.microsoft.com/en-us/appcenter/distribution/codepush/react-native for more information

Muneer PP
  • 77
  • 5