react-native-version-check: VersionCheck.needUpdate() returns undefined in IOS
This is the code I’m using
VersionCheck.needUpdate().then(res => {
console.log("res version check >>>>>> ", res); // undefined on iOS
if (res.isNeeded) {
this.setState({
showNewVersionModal: true
});
}
});
it works fine on Android but on iOS it returns undefined
Version: “react-native-version-check”: “^3.3.0”, “react-native”: “^0.57.8”,
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 15
I installed this package with autolinking but this problem still exist.
You can check your app url in browser, maybe they has a specific country code. you can add params for country code like this
VersionCheck.needUpdate({country: <your-country-code>})This works for me