@microsoft/omnichannel-chat-sdk 1.11.3-main.48240b1 → 1.11.3-main.7a14964

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.
Files changed (2) hide show
  1. package/README.md +22 -49
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -150,11 +150,7 @@ npm install @microsoft/omnichannel-chat-sdk --save
150
150
 
151
151
  ## Installation on React Native
152
152
 
153
- ***Important Note:***
154
- - For React Native versions **0.71 and above**: Steps 1, 2, 3 are **required only for iOS**. Not needed for Android.
155
- - For React Native versions **below 0.71**: Steps 1, 2, 3 are **required for both Android and iOS**.
156
-
157
- ### Steps
153
+ The following steps will be required to run Omnichannel Chat SDK on React Native:
158
154
 
159
155
  1. Install `node-libs-react-native`
160
156
 
@@ -162,69 +158,46 @@ npm install @microsoft/omnichannel-chat-sdk --save
162
158
  npm install node-libs-react-native --save-dev
163
159
  ```
164
160
 
165
- 2. Install `react-native-randombytes`
161
+ 1. Install `react-native-randomBytes`
162
+
166
163
  ```console
167
164
  npm install react-native-randombytes --save-dev
168
165
  ```
169
166
 
170
- 3. Install `react-native-get-random-values`
167
+ 1. Install `react-native-get-random-values`
168
+
171
169
  ```console
172
170
  npm install react-native-get-random-values --save-dev
173
171
  ```
174
-
175
- 4. Install `react-native-url-polyfill`
172
+
173
+ 1. Install `react-native-url-polyfill`
176
174
 
177
175
  ```console
178
176
  npm install react-native-url-polyfill --save-dev
179
177
  ```
180
178
 
181
- 5. Install `@azure/core-asynciterator-polyfill`
179
+ 1. Install `@azure/core-asynciterator-polyfill`
182
180
 
183
181
  ```console
184
182
  npm install @azure/core-asynciterator-polyfill --save-dev
185
183
  ```
186
- **iOS and Android Platforms**
187
-
188
- | React Native Version | Libraries | iOS | Android |
189
- | ----------------------- | -------------------------------- | --------- | ----------- |
190
- | 0.71 and above | | | |
191
- | | node-libs-react-native | ✅ Yes | ❌ No |
192
- | | react-native-randombytes | ✅ Yes | ❌ No |
193
- | | react-native-get-random-values | ✅ Yes | ❌ No |
194
- | | react-native-url-polyfill | ✅ Yes | ✅ Yes |
195
- | | @azure/core-asynciterator-polyfill | ✅ Yes | ✅ Yes |
196
-
197
- Below 0.71 version you need to add all above libraries.
198
-
199
- **Required file changes**
200
- 1. In metro.config.js
201
- - Update *metro.config.js* to use React Native compatible Node Core modules.
184
+
185
+ 1. Update *metro.config.js* to use React Native compatible Node Core modules
186
+
202
187
  ```ts
203
- const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
204
- const nodeLibs = require('node-libs-react-native'); // Import node-libs-react-native
205
- const config = {
206
- resolver: {
207
- extraNodeModules: {
208
- ...nodeLibs,
209
- net: require.resolve('node-libs-react-native/mock/net'),
210
- tls: require.resolve('node-libs-react-native/mock/tls'),
211
- },
212
- },
188
+ module.exports = {
189
+ // ...
190
+ resolver: {
191
+ extraNodeModules: {
192
+ ...require('node-libs-react-native'),
193
+ net: require.resolve('node-libs-react-native/mock/net'),
194
+ tls: require.resolve('node-libs-react-native/mock/tls')
195
+ }
196
+ }
213
197
  };
214
198
  ```
215
- - If you encounter a crypto issue for iOS (e.g. error "crypto.getRandomValues() not supported") you should install crypto-browserify and stream-browserify, then add the following lines to your *metro.config.js* file.
216
-
217
- ```ts
218
- const config = {
219
- resolver: {
220
- extraNodeModules: {
221
- crypto: require.resolve("crypto-browserify"),
222
- stream: require.resolve("stream-browserify"),
223
- },
224
- },
225
- };
226
- ```
227
- 2. Add the following *import* on top of your entry point file
199
+
200
+ 1. Add the following *import* on top of your entry point file
228
201
 
229
202
  ```ts
230
203
  import 'node-libs-react-native/globals';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-sdk",
3
- "version": "1.11.3-main.48240b1",
3
+ "version": "1.11.3-main.7a14964",
4
4
  "description": "Microsoft Omnichannel Chat SDK",
5
5
  "files": [
6
6
  "lib/**/*"