Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
React Native library for OpenTok iOS and Android SDKs
In your terminal, change into your React Native project's directory
Add the library using npm
or yarn
.
npm install opentok-react-native
yarn add opentok-react-native
Note: Please make sure to have CocoaPods on your computer.
If you've installed this package before, you may need to edit your Podfile
and project structure because the installation process has changed.
In you terminal, change into the ios
directory of your React Native project.
Create a pod file by running: pod init
.
Add the following to your pod file:
target '<YourProjectName>' do
# Pods for <YourProject>
pod 'OpenTok', '2.16.1'
end
Now run, pod install
After installing the OpenTok iOS SDK, change into your root directory of your project.
Now run, react-native link opentok-react-native
.
Open <YourProjectName>.xcworkspace
contents in XCode. This file can be found in the ios
folder of your React Native project.
Click File
and New File
Add an empty swift file to your project:
OTInstall.swift
. This is done to set some flags in XCode so the Swift code can be used.Click Create Bridging Header
when you're prompted with the following modal: Would you like to configure an Objective-C bridging header?
Ensure you have enabled both camera and microphone usage by adding the following entries to your Info.plist
file:
<key>NSCameraUsageDescription</key>
<string>Your message to user when the camera is accessed for the first time</string>
<key>NSMicrophoneUsageDescription</key>
<string>Your message to user when the microphone is accessed for the first time</string>
If you try to archive the app and it fails, please do the following:
In your terminal, change into your project directory.
If you have already run react-native link opentok-react-native
for the iOS installation, please skip this step.
react-native link opentok-react-native
Open your Android project in Android Studio.
Add the following to your project build.gradle
file:
maven {
url "http://tokbox.bintray.com/maven"
}
Sync Gradle
Make sure the following in your app's gradle compileSdkVersion
, buildToolsVersion
, minSdkVersion
, and targetSdkVersion
are greater than or equal to versions specified in the OpenTok React Native library.
As for the older Android devices, ensure you add camera and audio permissions to your AndroidManifest.xml
file:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.microphone" android:required="true" />
Newer versions of Android–API Level 23
(Android 6.0)–have a different permissions model that is already handled by this library.
To see this library in action, check out the opentok-react-native-samples repo.
If you make changes to the project that you would like to contribute back then please follow the contributing guidelines. All contributions are greatly appreciated!
FAQs
opentok react native Test
The npm package otrn-test receives a total of 1 weekly downloads. As such, otrn-test popularity was classified as not popular.
We found that otrn-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.