This is a simple React Native module that allows you to retrieve the App Settings URL from within your React Native application.
To install, run:
npm install --save react-native-settings-url
Then, be sure to link the native modulue:
react-native link
Inside your React Native app, you can now do something like this:
import { Linking } from 'react-native';
import SettingsURL from 'react-native-settings-url';
SettingsURL.getURL()
.then(url => {
return Promise.all([
url,
Linking.canOpenURL(url),
]);
})
.then(([url, supported]) => {
if (supported) {
Linking.openURL(url);
}
});
Please direct any questions or feedback to the author, Giles Van Gruisen, at giles [at] thoughtbot [dot] com.
react-native-settings-url is copyright © 2017 thoughtbot. It is free software,
and may be redistributed under the terms specified in the LICENSE
file.
react-native-settings-url is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software! See our other projects or hire us to design, develop, and grow your product.