https://github.com/opengeekslab/rn-opentok
https://github.com/opengeekslab/rn-opentok
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/opengeekslab/rn-opentok
- Owner: openGeeksLab
- Created: 2017-05-04T09:17:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T06:34:50.000Z (about 9 years ago)
- Last Synced: 2025-02-26T22:28:16.078Z (over 1 year ago)
- Language: Objective-C
- Size: 68.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rn-opentok
## Getting started
`$ npm install rn-opentok --save`
### Mostly automatic installation
`$ react-native link rn-opentok`
### Manual installation
#### iOS
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `rn-opentok` and add `RNOpentok.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNOpentok.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.opengeekslab.RNOpentokPackage;` to the imports at the top of the file
- Add `new RNOpentokPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':rn-opentok'
project(':rn-opentok').projectDir = new File(rootProject.projectDir, '../node_modules/rn-opentok/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':rn-opentok')
```
#### Windows
[Read it! :D](https://github.com/ReactWindows/react-native)
1. In Visual Studio add the `RNOpentok.sln` in `node_modules/rn-opentok/windows/RNOpentok.sln` folder to their solution, reference from their app.
2. Open up your `MainPage.cs` app
- Add `using Com.Reactlibrary.RNOpentok;` to the usings at the top of the file
- Add `new RNOpentokPackage()` to the `List` returned by the `Packages` method
## Usage
```javascript
import RNOpentok from 'rn-opentok';
// TODO: What to do with the module?
RNOpentok;
```