寻找类似的东西:
<Text>VERSION={CodePush.VersionLabel}</Text>
其中CodePush.VersionLabel是类似于“ v6”的内容,它显示在code-push deployment ls <MyApp>
中
我想在登录屏幕的底部显示此内容。
最佳答案
componentDidMount(){
codePush.getUpdateMetadata().then((metadata) =>{
this.setState({label: metadata.label, version: metadata.appVersion, description: metadata.description});
});
}
render() {
return(
<Text>{this.state.version}.{this.state.label}</Text>
);
}
注意:
.label
属性是CodePush使用的内部内部版本号(例如v24
)
关于react-native - 如何在React Native Android应用中显示当前的CodePush版本标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39796511/