How to use the react-native-code-push.UpdateState function in react-native-code-push

To help you get started, we’ve selected a few react-native-code-push examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SystangoTechnologies / Crashalert / RNCrashExamples / js / components / home / index.js View on Github external
getUpdateMetadata() {
    CodePush.getUpdateMetadata(CodePush.UpdateState.RUNNING)
      .then((metadata) => {
        this.setState({ syncMessage: metadata ? JSON.stringify(metadata) : 'Running binary version', progress: false });
      }, (error) => {
        this.setState({ syncMessage: `Error: ${error}`, progress: false });
      });
  }
github birkir / kvikmyndr-app / src / components / list-item-update-version / ListItemUpdateVersion.js View on Github external
async getUpdateMetadata() {
    try {
      this.metadata = await CodePush.getUpdateMetadata(CodePush.UpdateState.RUNNING);
    } catch (err) {
      this.metadata = `Error: ${err}`;
    }
    this.progress = false;
  }
github lisong / code-push-demo-app / App.js View on Github external
getUpdateMetadata() {
    CodePush.getUpdateMetadata(CodePush.UpdateState.RUNNING)
      .then((metadata: LocalPackage) => {
        this.setState({ syncMessage: metadata ? JSON.stringify(metadata) : "Running binary version", progress: false });
      }, (error: any) => {
        this.setState({ syncMessage: "Error: " + error, progress: false });
      });
  }