Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
VersionCheck.needUpdate({
latestVersion: '1.0.0',
}).then(res => this.setState(res));
VersionCheck.getStoreUrl({ appID: '364709193' }).then(res => {
//App Store ID for iBooks.
this.setState({ storeUrl: res });
});
}
render() {handleAppStoreLink = async () => {
try {
Linking.openURL(
await VersionCheck.getStoreUrl({ appName: appNameIos, appID: appIdIos })
);
} catch (e) {
this.props.onError(e);
}
};