Socket
Socket
Sign inDemoInstall

opentok-react-native

Package Overview
Dependencies
20
Maintainers
4
Versions
84
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.27.3 to 2.27.4

13

CHANGELOG.md

@@ -0,1 +1,14 @@

# 2.27.4 (April 2024)
- [Update]: This version updates the Vonage Video iOS SDK version to 2.27.3. This version adds a [privacy manifest required by Apple's App store](https://developer.apple.com/support/third-party-SDK-requirements). Issue #737.
- [Update]: The installation instructions in the README file are updated, with new details on required Android permissions (such as `android.permission.BLUETOOTH`).
# 2.26.2 (April 2024)
- [Update]: This version updates the Vonage Video iOS SDK version to 2.26.3. This version adds a [privacy manifest required by Apple's App store](https://developer.apple.com/support/third-party-SDK-requirements). Issue #737.
# 2.25.5 (April 2024)
- [Update]: This version updates the Vonage Video iOS SDK version to 2.25.5. This version adds a [privacy manifest required by Apple's App store](https://developer.apple.com/support/third-party-SDK-requirements). Issue #737.
# 2.27.3 (March 2024)

@@ -2,0 +15,0 @@

2

package.json
{
"name": "opentok-react-native",
"version": "2.27.3",
"version": "2.27.4",
"description": "React Native components for OpenTok iOS and Android SDKs",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -11,101 +11,111 @@ # opentok-react-native

## Pre-Requisites:
## Prerequisites
1. Install [node.js](https://nodejs.org/)
2. Install and update [Xcode](https://developer.apple.com/xcode/) (you will need a Mac)
2. Install and update [Xcode](https://developer.apple.com/xcode/) (you will need a Mac). (See the React Native iOS installation [instructions](https://facebook.github.io/react-native/docs/getting-started.html).)
- React Native iOS installation [instructions](https://facebook.github.io/react-native/docs/getting-started.html)
3. Install and update [Android Studio](https://developer.android.com/studio/index.html). (See the React Native Android installation [instructions](https://facebook.github.io/react-native/docs/getting-started.html).)
3. Install and update [Android Studio](https://developer.android.com/studio/index.html)
## Installation
- React Native Android installation [instructions](https://facebook.github.io/react-native/docs/getting-started.html)
1. In your terminal, change into your React Native project's directory.
## Installation:
2. Add the library using `npm` or `yarn`:
1. In your terminal, change into your React Native project's directory
* `npm install opentok-react-native`
* `yarn add opentok-react-native`
2. Add the library using `npm` or `yarn`.
### iOS Installation
- `npm install opentok-react-native`
- `yarn add opentok-react-native`
1. Install the iOS pods:
### iOS Installation
```
npx pod-install
```
**Note:** Please make sure to have [CocoaPods](https://cocoapods.org/) 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.
2. **For React Native versions prior to 0.60**:
1. In you terminal, change into the `ios` directory of your React Native project.
* Add this to your Podfile:
2. Create a pod file by running: `pod init`.
```
target '<YourProjectName>' do
# Pods for <YourProject>
pod 'OTXCFramework', '2.27.3'
end
```
* Run `react-native link opentok-react-native`.
**For React Native < 0.60**, add this to your Podfile:
These steps are not necessary in React Native version 0.60 and later.
```
target '<YourProjectName>' do
3. Ensure you have enabled both camera and microphone usage by adding the following entries to the `Info.plist` file:
# Pods for <YourProject>
pod 'OTXCFramework', '2.27.2'
end
```
<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>
```
```
When you create an archive of your app, the [privacy manifest settings required by Apple's App store](https://developer.apple.com/support/third-party-SDK-requirements) are added automatically with this version of the OpenTok React Native SDK.
3. Now run, `pod install`
If you try to archive the app and it fails, please do the following:
4. After installing the OpenTok iOS SDK, change into your root directory of your project.
1. Go to *Target*.
**For React Native < 0.60**, now run `react-native link opentok-react-native`.
2. Click *Build Phases*.
5. Open `<YourProjectName>.xcworkspace` contents in XCode. This file can be found in the `ios` folder of your React Native project.
3. Under the *Link Binary With Libraries* section, remove `libOpenTokReactNative.a` and add it again.
6. Click `File` and `New File`
### Android Installation
7. Add an empty swift file to your project:
1. In your terminal, change into your project directory.
- You can name this file anything i.e: `OTInstall.swift`. This is done to set some flags in XCode so the Swift code can be used.
2. **For React Native versions prior to 0.60**:
8. Click `Create Bridging Header` when you're prompted with the following modal: `Would you like to configure an Objective-C bridging header?`
- Run `react-native link opentok-react-native`
9. Ensure you have enabled both camera and microphone usage by adding the following entries to your `Info.plist` file:
This step is not necessary in React Native version 0.60 and later.
```
<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>
```
3. Run `bundle install`.
If you try to archive the app and it fails, please do the following:
4. 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.
1. Go to Target
2. Click on Build Phases
3. Under the Link Binary With Libraries section, remove the libOpenTokReactNative.a and add it again
5. For older Android devices, add the following permissions to the `AndroidManifest.xml` file:
### Android Installation
* `android.permission.BLUETOOTH` -- The default audio device supports
Bluetooth audio. If your app does not use the default audio device and does not
use Bluetooth, you can remove this permission.
1. In your terminal, change into your project directory.
* `android.permission.BLUETOOTH_CONNECT` -- You need to enable this for API level 31 and above. If you want
to use the Bluetooth device with Android SDK DefaultAudioDevice targeting API level 31 and above, please
ask for runtime permissions in the app or enable the ("Nearby devices/Bluetooth") permission manually in
the app settings.
2. If you have already run `react-native link opentok-react-native` for the iOS installation, please skip this step.
* `android.permission.BROADCAST_STICKY` -- We have determined that this is unused by
the OpenTok Android SDK, and we will remove this permission from an upcoming release.
- Run `react-native link opentok-react-native`
* `android.permission.CAMERA` -- If your app does not use the default video capturer
and does not access the camera, you can remove this permission.
3. Open your Android project in Android Studio.
* `android.permission.INTERNET` -- Required.
4. Sync Gradle
* `android.permission.MODIFY_AUDIO_SETTINGS` -- If your app does not use the default audio
device and does not access the microphone, you can remove this permission.
5. 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.
* `android.permission.READ_PHONE_STATE` -- The OpenTok Android SDK requests this permission in API level 22
and lower, and 31 and above.
6. As for the older Android devices, ensure you add camera and audio permissions to your `AndroidManifest.xml` file:
* `android.permission.RECORD_AUDIO` -- If your app does not use the default audio
device and does not access the microphone, you can remove this permission.
```xml
<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" />
```
For newer versions of Android — `API Level 23` (Android 6.0) and later — you do not need to add these to your app manifest. The OpenTok React Native SDK adds them automatically. However, if you use Android 21+, certain permissions require you to prompt the user.
Newer versions of Android–`API Level 23` (Android 6.0)–have a different permissions model that is already handled by this library.
Your app can remove any of these permissions that will not be required. See [this post](https://stackoverflow.com/a/31616472) and [this Android documentation](https://developer.android.com/studio/build/manifest-merge). For example, this removes the `android.permission.CAMERA` permission:
```
<uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>
```
#### Bintray sunset

@@ -112,0 +122,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc