How to use the react-native-code-push.restartApp 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 shoutem / extensions / shoutem.application / app / services / restart.js View on Github external
export function restartApp() {
  // eslint-disable-next-line new-cap
  CodePush.restartApp();
}
github RN-ONE / RNFrameWorkNew / app / util / CheckCodePushUpdateUtil.js View on Github external
instance.install(codePush.InstallMode.IMMEDIATE).then(() => {
                console.log("安装完成");
                codePush.notifyAppReady();
                codePush.allowRestart();
                codePush.restartApp(true);
            }).catch(reason => {
                CheckCodePushUpdateUtil.error();
github birkir / hekla / src / stores / UI.ts View on Github external
restartApp() {
      return CodePush.restartApp(false);
    },
github SystangoTechnologies / Crashalert / RNCrashExamples / js / components / home / index.js View on Github external
this.setState({ syncMessage: 'Downloading package.' });
        break;
      case CodePush.SyncStatus.AWAITING_USER_ACTION:
        this.setState({ syncMessage: 'Awaiting user action.' });
        break;
      case CodePush.SyncStatus.INSTALLING_UPDATE:
        this.setState({ syncMessage: 'Installing update.' });
        break;
      case CodePush.SyncStatus.UP_TO_DATE:
        this.setState({ syncMessage: 'App up to date.', progress: false });
        break;
      case CodePush.SyncStatus.UPDATE_IGNORED:
        this.setState({ syncMessage: 'Update cancelled by user.', progress: false });
        break;
      case CodePush.SyncStatus.UPDATE_INSTALLED:
        CodePush.restartApp(false);
        this.setState({ syncMessage: 'Update installed and will be applied on restart.', progress: false });
        break;
      case CodePush.SyncStatus.UNKNOWN_ERROR:
        this.setState({ syncMessage: 'An unknown error occurred.', progress: false });
        break;
    }
  }
github duheng / Mozi / src / components / CodepushUpdate / index.js View on Github external
this.setState({ showUpdate: false, }, () => {
                        CodePush.restartApp(true);
                      });
                    }}