1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-18 21:10:40 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

避免在debug模式下调用

This commit is contained in:
sunnylqm
2019-10-04 22:27:33 +08:00
parent c40bf71032
commit 08ac354ba5
3 changed files with 35 additions and 23 deletions

View File

@@ -49,6 +49,10 @@ export default class App extends Component {
};
checkUpdate = () => {
if (__DEV__) {
// 开发模式不支持热更新,跳过检查
return;
}
checkUpdate(appKey).then(info => {
if (info.expired) {
Alert.alert('提示', '您的应用版本已更新,请前往应用商店下载新的版本', [
@@ -63,7 +67,7 @@ export default class App extends Component {
]);
}
}).catch(err => {
Alert.alert('提示', '检查更新失败.');
console.warn(err);
});
};