diff --git a/CHANGELOG.md b/CHANGELOG.md index fb19f2da..75b6ab8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/README.md b/README.md index ff4ae47d..666832b8 100644 --- a/README.md +++ b/README.md @@ -8,104 +8,114 @@ This library is now officially supported by Vonage. In this repo, you'll find the OpenTok React Native library. -## 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 '' do + # Pods for + 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 '' do +3. Ensure you have enabled both camera and microphone usage by adding the following entries to the `Info.plist` file: - # Pods for - pod 'OTXCFramework', '2.27.2' - end + ``` + NSCameraUsageDescription + Your message to user when the camera is accessed for the first time + NSMicrophoneUsageDescription + Your message to user when the microphone is accessed for the first time + ``` -``` +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: + +1. Go to *Target*. -4. After installing the OpenTok iOS SDK, change into your root directory of your project. +2. Click *Build Phases*. -**For React Native < 0.60**, now run `react-native link opentok-react-native`. +3. Under the *Link Binary With Libraries* section, remove `libOpenTokReactNative.a` and add it again. -5. Open `.xcworkspace` contents in XCode. This file can be found in the `ios` folder of your React Native project. +### Android Installation -6. Click `File` and `New File` +1. In your terminal, change into your project directory. -7. Add an empty swift file to your project: +2. **For React Native versions prior to 0.60**: - - 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. + - Run `react-native link opentok-react-native` -8. Click `Create Bridging Header` when you're prompted with the following modal: `Would you like to configure an Objective-C bridging header?` + This step is not necessary in React Native version 0.60 and later. -9. Ensure you have enabled both camera and microphone usage by adding the following entries to your `Info.plist` file: +3. Run `bundle install`. -``` -NSCameraUsageDescription -Your message to user when the camera is accessed for the first time -NSMicrophoneUsageDescription -Your message to user when the microphone is accessed for the first time -``` +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. -If you try to archive the app and it fails, please do the following: +5. For older Android devices, add the following permissions to the `AndroidManifest.xml` file: -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 + * `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. -### Android Installation + * `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. -1. In your terminal, change into your project directory. + * `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. -2. If you have already run `react-native link opentok-react-native` for the iOS installation, please skip this step. + * `android.permission.CAMERA` -- If your app does not use the default video capturer + and does not access the camera, you can remove this permission. - - Run `react-native link opentok-react-native` + * `android.permission.INTERNET` -- Required. -3. Open your Android project in Android Studio. + * `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. -4. Sync Gradle + * `android.permission.READ_PHONE_STATE` -- The OpenTok Android SDK requests this permission in API level 22 + and lower, and 31 and above. -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.RECORD_AUDIO` -- If your app does not use the default audio + device and does not access the microphone, you can remove this permission. -6. As for the older Android devices, ensure you add camera and audio permissions to your `AndroidManifest.xml` file: + 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. -```xml - - - - - - -``` + 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. + ``` + + ``` #### Bintray sunset diff --git a/opentok-react-native.podspec b/opentok-react-native.podspec index 04713e9b..53fd8165 100644 --- a/opentok-react-native.podspec +++ b/opentok-react-native.podspec @@ -17,5 +17,5 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,swift}" s.dependency 'React' - s.dependency 'OTXCFramework','2.27.2' + s.dependency 'OTXCFramework','2.27.3' end diff --git a/package-lock.json b/package-lock.json index 4be2590f..9a4810bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "opentok-react-native", - "version": "2.27.3", + "version": "2.27.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "opentok-react-native", - "version": "2.27.3", + "version": "2.27.4", "license": "MIT", "dependencies": { "axios": "^1.6.8", diff --git a/package.json b/package.json index d5819ea8..af31c5ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opentok-react-native", - "version": "2.27.3", + "version": "2.27.4", "description": "React Native components for OpenTok iOS and Android SDKs", "main": "src/index.js", "homepage": "https://www.tokbox.com",