Skip to content

Instantly share code, notes, and snippets.

@rcerrejon
Created June 27, 2017 14:40
Show Gist options
  • Save rcerrejon/2d3e2a39f3b2f88c7f957fb52151c965 to your computer and use it in GitHub Desktop.
Save rcerrejon/2d3e2a39f3b2f88c7f957fb52151c965 to your computer and use it in GitHub Desktop.
Link to Appstore/GooglePlay
let urlStore = 'iTunes Link';
if (Platform.OS === 'android') {
urlStore = 'Google Play Link';
}
Alert.alert(
'Appstore / Google Play',
'Linking to Store',
[{
text: 'OK',
onPress: () => Linking
.openURL(urlStore)
.catch(err => console.error('Unexpected Error', err))
}],
{ cancelable: false }
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment