Created
June 27, 2017 14:40
-
-
Save rcerrejon/2d3e2a39f3b2f88c7f957fb52151c965 to your computer and use it in GitHub Desktop.
Link to Appstore/GooglePlay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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