Skip to content

Commit

Permalink
Merge pull request #755 from opentok/vonage-2.27.4
Browse files Browse the repository at this point in the history
Vonage 2.27.4
  • Loading branch information
jeffswartz authored Jun 20, 2024
2 parents 3256ce0 + 3512019 commit 6e2dc30
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 63 deletions.
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 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)

- [Update]: This version updates the Vonage Video iOS SDK version to 2.27.2 and the Vonage Video Android SDK version to 2.27.1. See their release notes for details:
Expand All @@ -11,7 +24,7 @@

- [Fix]: On Android, a screen-sharing OTPublisher (one with the `videoSource` setting set to `"screen"`) failed if the app did not have camera access permission. This version fixes the issue, so that screen-sharing can proceed without camera access permission.

*Note:* In Android 6.0 (`API Level 23`) and higher, the OpenTok React Native SDK automatically adds the camera access permission. However, an app or user can disable it independently of the SDK.
*Note:* In Android 6.0 (`API Level 23`) and higher, the Vonage Video React Native SDK automatically adds the camera access permission. However, an app or user can disable it independently of the SDK.

- [Update]: Updates react-native and axios packages to fix vulnerable dependencies.

Expand All @@ -30,7 +43,7 @@ import { PermissionsAndroid } from 'react-native';
/>
```

*Note:* In Android 6.0 (`API Level 23`) and higher, the OpenTok React Native SDK automatically adds these permissions. However, an app or user can disable them independently of the SDK.
*Note:* In Android 6.0 (`API Level 23`) and higher, the Vonage Video React Native SDK automatically adds these permissions. However, an app or user can disable them independently of the SDK.

- [Fix]: On Android, setting the `videoTrack` property of the `properties` prop of the OTPublisher component `false` resulted in the app to crash. This version fixes the issue (issue #652).

Expand Down
124 changes: 67 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,104 +6,114 @@ React Native library for using the [Vonage Video API](https://developer.vonage.c

This library is now officially supported by Vonage.

## 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:

1. In your terminal, change into your React Native project's directory

2. Add the library using `npm` or `yarn`.
2. Add the library using `npm` or `yarn`:

- `npm install @vonage/client-sdk-video-react-native`
- `yarn add @vonage/client-sdk-video-react-native`

### iOS Installation

**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.
1. Install the iOS pods:

1. In you terminal, change into the `ios` directory of your React Native project.
```
npx pod-install
```

2. Create a pod file by running: `pod init`.
2. **For React Native versions prior to 0.60**:

**For React Native < 0.60**, add this to your Podfile:
* Add this to your Podfile:

```
target '<YourProjectName>' do
# Pods for <YourProject>
```
target '<YourProjectName>' do
# Pods for <YourProject>
pod 'VonageClientSDKVideoMacOS', '2.27.2'
end
end
```
* Run `react-native link @vonage/client-sdk-video-react-native`.
```
These steps are not necessary in React Native version 0.60 and later.
3. Now run, `pod install`
3. Ensure you have enabled both camera and microphone usage by adding the following entries to the `Info.plist` file:
4. After installing the Vonage Video iOS SDK, change into your root directory of your project.
```
<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>
```
**For React Native < 0.60**, now run `react-native link vonage/client-sdk-video-react-native`.
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.
5. Open `<YourProjectName>.xcworkspace` contents in XCode. This file can be found in the `ios` folder of your React Native project.
If you try to archive the app and it fails, please do the following:
6. Click `File` and `New File`
1. Go to *Target*.
7. Add an empty swift file to your project:
2. Click *Build Phases*.
- 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.
3. Under the *Link Binary With Libraries* section, remove `libOpenTokReactNative.a` and add it again.
8. Click `Create Bridging Header` when you're prompted with the following modal: `Would you like to configure an Objective-C bridging header?`
### Android Installation
9. Ensure you have enabled both camera and microphone usage by adding the following entries to your `Info.plist` file:
1. In your terminal, change into your project directory.
```
<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>
```
2. **For React Native versions prior to 0.60**:
If you try to archive the app and it fails, please do the following:
- Run `react-native link @vonage/client-sdk-video-react-native`
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
This step is not necessary in React Native version 0.60 and later.
### Android Installation
3. Run `bundle install`.
1. In your terminal, change into your project directory.
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 Vonage Video React library.
2. If you have already run `react-native link @vonage/client-sdk-video-react-native` for the iOS installation, please skip this step.
5. For older Android devices, add the following permissions to the `AndroidManifest.xml` file:
- Run `react-native link @vonage/client-sdk-video-react-native`
* `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.
3. Open your Android project in Android Studio.
* `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.
4. Sync Gradle
* `android.permission.BROADCAST_STICKY` -- We have determined that this is unused by
the Vonage Video Android SDK, and we will remove this permission from an upcoming release.
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 Vonage Video React Native library.
* `android.permission.CAMERA` -- If your app does not use the default video capturer
and does not access the camera, you can remove this permission.
6. As for the older Android devices, ensure you add camera and audio permissions to your `AndroidManifest.xml` file:
* `android.permission.INTERNET` -- Required.
```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" />
```
* `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.
* `android.permission.READ_PHONE_STATE` -- The Vonage Video Android SDK requests this permission in API level 22
and lower, and 31 and above.
* `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.
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 Vonage Video React Native SDK adds them automatically. However, if you use Android 21+, certain permissions require you to prompt the user.
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:
Newer versions of Android–`API Level 23` (Android 6.0)–have a different permissions model that is already handled by this library.
```
<uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>
```
#### Bintray sunset
Expand Down
2 changes: 1 addition & 1 deletion client-sdk-video-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,swift}"

s.dependency 'React'
s.dependency 'VonageClientSDKVideo','2.27.2'
s.dependency 'VonageClientSDKVideo','2.27.3'
end
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vonage/client-sdk-video-react-native",
"version": "2.27.3",
"version": "2.27.4",
"description": "React Native components for Vonage Video iOS and Android SDKs",
"main": "src/index.js",
"homepage": "https://developer.vonage.com/en/video/overview",
Expand Down

0 comments on commit 6e2dc30

Please sign in to comment.