@kaleyra/video-react-native-module 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,7 +24,9 @@ yarn link
24
24
  cd example
25
25
  # nano .env use your own keys
26
26
  yarn link @kaleyra/video-react-native-module
27
- yarn android/ios
27
+ yarn pods
28
+ yarn ios
29
+ yarn android
28
30
  ```
29
31
 
30
32
  ## How to install the module:
@@ -35,6 +37,37 @@ Open the **terminal** in your React-Native-App folder and run the following comm
35
37
  npm install @kaleyra/video-react-native-module
36
38
  ```
37
39
 
40
+ # Android additional configuration may be required (depends on your integration)
41
+ - add tools:replace="android:allowBackup" to AndroidManifest.xml. See here for an [example](https://github.com/KaleyraVideo/VideoReactNativeModule/blob/main/example/android/app/src/main/AndroidManifest.xml#L8)
42
+ - add maven { url 'https://maven.bandyer.com/releases' } in build.gradle. See here for an [example](https://github.com/KaleyraVideo/VideoReactNativeModule/blob/1599d0f355e4a699a92404c450102e519cfe2866/example/android/build.gradle#L32)
43
+
44
+ ### Standalone iOS framework
45
+
46
+ In case your application already provides the WebRTC framework in a third party module, a conflict may arise when trying to install the depedencies through Cocoapods.
47
+ In order to resolve the conflict you can download and install the Kaleyra Video iOS framework as a standalone package.
48
+ To enable the standalone framework you must change your application's Podfile declaring the `$KaleyraNoWebRTC` variable before the first target definition. You can give whatever value you want to the variable as long as it is defined before the target definitions.
49
+
50
+ ```ruby
51
+ platform :ios, min_ios_version_supported
52
+ prepare_react_native_project!
53
+
54
+ # use_frameworks! is required for using Bandyer framework, linkage static is required by React Native instead.
55
+ use_frameworks! :linkage => :static
56
+
57
+ $KaleyraNoWebRTC = ''
58
+
59
+ target 'KaleyraVideoReact' do
60
+ config = use_native_modules!
61
+
62
+ # Flags change depending on the env values.
63
+ flags = get_default_flags()
64
+ [...]
65
+ end
66
+ ```
67
+
68
+ > [!CAUTION]
69
+ > Use the standalone framework only as a last resort in case you have a WebRTC framework conflict. Because we cannot guarantee that the WebRTC framework you are using is compatible with our SDK, you are responsible for assess the compatibility with our module. However, WebRTC versions greater than or equal to M100 should work fine.
70
+
38
71
  ## How to remove the module:
39
72
 
40
73
  ```shell
@@ -134,7 +167,7 @@ kaleyraVideo.events.oniOSVoipPushTokenUpdated = (token: string) => {
134
167
  ```
135
168
  **Warning:** Make sure this listener is attached before calling kaleyraVideo.connect(_), otherwise the event reporting the device token could be missed.
136
169
 
137
- The token provided in the callback is the **string** representation of your device token.
170
+ The token provided in the callback is the **string** representation of your device token.
138
171
  Here's an example of a device token: **dec105f879924349fd2fa9aa8bb8b70431d5f41d57bfa8e31a5d80a629774fd9**
139
172
 
140
173
  ### VoIP notification payload
@@ -145,7 +178,11 @@ Here's an example of a device token: **dec105f879924349fd2fa9aa8bb8b70431d5f41d5
145
178
  ## Module connect
146
179
 
147
180
  To connect the plugin to the Kaleyra Video system you will need to provide a Session object.
148
- The session needs a userID and a function returning a promise with the access token for that user
181
+ The session needs a userID and a function returning a promise with the access token for that user.
182
+
183
+ > [!IMPORTANT]
184
+ > - The *userID* should aready exists in our service. Your backend needs to create it by invoking this api [create_user](https://developers.kaleyra.io/reference/video-v2-user-post)
185
+ > - The *accessToken* should be generated from your backend by invoking this api [get_credentials](https://developers.kaleyra.io/reference/video-v2-sdk-post). Be aware that it expires. The callback will be called multiple times every time a new token is needed to refresh the user session.
149
186
 
150
187
  ```javascript
151
188
  kaleyraVideo.connect({
@@ -305,7 +342,7 @@ Example of acceptable payload
305
342
  }
306
343
  ```
307
344
 
308
- ## Proguard
345
+ ## Proguard
309
346
  ```groovy
310
347
  # Bandyer now Kaleyra proprietary SDK
311
348
  -keep class com.bandyer.** { *; }
@@ -1 +1 @@
1
- React/1.1.1
1
+ React/1.2.0
@@ -7,7 +7,7 @@ import Foundation
7
7
  class _KaleyraVideoHybridVersionInfo: NSObject {
8
8
 
9
9
  @objc
10
- static let krvVersion: String = "1.1.1"
10
+ static let krvVersion: String = "1.2.0"
11
11
 
12
12
  @objc
13
13
  static let krvPlatform: String = "react"
@@ -48,7 +48,7 @@ android {
48
48
  dependencies {
49
49
  implementation 'com.google.code.gson:gson:2.9.1'
50
50
  implementation "com.kaleyra:collaboration-suite-utils:3.0.6"
51
- implementation "com.bandyer:bandyer-android-sdk:3.7.3"
51
+ implementation "com.bandyer:bandyer-android-sdk:3.8.1"
52
52
  implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
53
53
  compileOnly "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1"
54
54
  implementation "androidx.room:room-runtime:2.4.0-beta02"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaleyra/video-react-native-module",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "description": "Kaleyra Video module for react native.",
6
6
  "main": "lib/commonjs/index.js",
@@ -17,7 +17,12 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}", "native-bridge/iOS/Source/**/*.swift"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "Bandyer", "~> 3.10.0"
20
+
21
+ if defined?($KaleyraNoWebRTC)
22
+ s.dependency "Bandyer/Core", "~> 3.11.0"
23
+ else
24
+ s.dependency "Bandyer", "~> 3.11.0"
25
+ end
21
26
 
22
27
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
28
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then