How to use the react-native-update.downloadUpdate function in react-native-update

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

github reactnativecn / react-native-pushy / Example / testHotUpdate / src / index.js View on Github external
doUpdate = async info => {
    const hash = await downloadUpdate(info);
    Alert.alert('提示', '下载完毕,是否重启应用?', [
      {
        text: '是',
        onPress: () => {
          switchVersion(hash);
        },
      },
      {text: '否'},
      {
        text: '下次启动时',
        onPress: () => {
          switchVersionLater(hash);
        },
      },
    ]);
  };
github Jines-z / rn-mobx-starter / src / routers / Mine / components / Update.js View on Github external
doUpdate = info => {
        downloadUpdate(info).then(hash => {
            Alert.alert('提示', '下载完毕,是否重启应用?', [
                {text: '是', onPress: ()=>{switchVersion(hash)}},
                {text: '否',},
                {text: '下次启动时', onPress: ()=>{switchVersionLater(hash)}},
            ])
        }).catch(err => {
            Alert.alert('提示', '更新失败.')
        })
    }
    check = () => {
github zetaoWu / IRunning / app / containers / AppSet.js View on Github external
doUpdate = info => {
        downloadUpdate(info).then(hash => {
            Alert.alert('提示', '下载完毕,是否重启应用?', [
                { text: '是', onPress: () => { switchVersion(hash); } },
                { text: '否', },
                { text: '下次启动时', onPress: () => { switchVersionLater(hash); } },
            ]);
        }).catch(err => {
            Alert.alert('提示', '更新失败.');
        });
    };
    checkUpdate = () => {