https://github.com/reactseals/react-native-uri-scheme
https://github.com/reactseals/react-native-uri-scheme
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/reactseals/react-native-uri-scheme
- Owner: reactseals
- License: mit
- Created: 2019-07-22T08:31:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-29T11:05:58.000Z (almost 6 years ago)
- Last Synced: 2025-08-02T02:51:22.477Z (12 months ago)
- Language: Java
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-uri-scheme
## Getting started
`$ npm install react-native-uri-scheme --save`
### Mostly automatic installation
`$ react-native link react-native-uri-scheme`
### Manual installation
#### iOS
1. Inert `pod 'RNUriScheme', :path => '../node_modules/react-native-uri-scheme'` into your PodFile
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactlibrary.RNReactNativeUriSchemePackage;` to the imports at the top of the file
- Add `new RNReactNativeUriSchemePackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-uri-scheme'
project(':react-native-uri-scheme').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-uri-scheme/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-uri-scheme')
```
## Usage
```javascript
import RNUriScheme from 'eact-native-uri-scheme';
RNUriScheme.getUriScheme()
```