[英]How to get app latest version from PlayStore/AppStore react native
I need to compare my app's version with the latest version from PlayStore/AppStore.我需要将我的应用程序版本与 PlayStore/AppStore 的最新版本进行比较。 I used react-native-version-check but it's not working properly for my app.
我使用了 react-native-version-check ,但它不能正常用于我的应用程序。 Is there a way to call directly to the stores which will contain the version in the response?
有没有办法直接调用将在响应中包含版本的商店? (using react native)
(使用本机反应)
I implemented your scenario using a mixture of react-native-config and react-native-appstore-version-checker.我使用 react-native-config 和 react-native-appstore-version-checker 的混合来实现你的场景。
The installed app version I used react-native-config to create an app version variable that I retrieve with: Config.REACT_APP_VERSION
已安装的应用程序版本我使用 react-native-config 创建我检索的应用程序版本变量:
Config.REACT_APP_VERSION
For the app store version, I used the react-native-appstore-version-checker module.对于应用商店版本,我使用了 react-native-appstore-version-checker 模块。 The installation instructions worked great.
安装说明效果很好。
For my use-case, I wanted to do something different if the upgrade was a major or minor, so I then split the two app versions and did major/minor/build comparisons.对于我的用例,如果升级是主要的还是次要的,我想做一些不同的事情,所以我然后拆分了两个应用程序版本并进行了主要/次要/构建比较。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.