@microsoft/omnichannel-chat-sdk 1.11.3-main.48240b1 → 1.11.3-main.9b6b5bc
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 +29 -45
- package/package.json +1 -1
package/README.md
CHANGED
@@ -150,16 +150,16 @@ npm install @microsoft/omnichannel-chat-sdk --save
|
|
150
150
|
|
151
151
|
## Installation on React Native
|
152
152
|
|
153
|
-
|
154
|
-
- For React Native versions **0.71 and above**: Steps 1, 2, 3 are **required only for iOS**. Not needed for Android.
|
153
|
+
**Important:**
|
155
154
|
- For React Native versions **below 0.71**: Steps 1, 2, 3 are **required for both Android and iOS**.
|
156
|
-
|
155
|
+
- For React Native versions **0.71 and above**: Steps 1, 2, 3 are **required only for iOS** (not needed for Android).
|
156
|
+
|
157
157
|
### Steps
|
158
158
|
|
159
|
-
1. Install `
|
159
|
+
1. Install `react-native-get-random-values`
|
160
160
|
|
161
161
|
```console
|
162
|
-
npm install
|
162
|
+
npm install react-native-get-random-values --save-dev
|
163
163
|
```
|
164
164
|
|
165
165
|
2. Install `react-native-randombytes`
|
@@ -171,7 +171,16 @@ npm install @microsoft/omnichannel-chat-sdk --save
|
|
171
171
|
```console
|
172
172
|
npm install react-native-get-random-values --save-dev
|
173
173
|
```
|
174
|
-
|
174
|
+
|
175
|
+
**Summary Table:**
|
176
|
+
|
177
|
+
| React Native Version | Platform | Are these steps required? |
|
178
|
+
|-------------------------|-----------|--------------------------|
|
179
|
+
| Below 0.71 | Android | ✅ Yes |
|
180
|
+
| Below 0.71 | iOS | ✅ Yes |
|
181
|
+
| 0.71 and above | Android | ❌ No |
|
182
|
+
| 0.71 and above | iOS | ✅ Yes |
|
183
|
+
|
175
184
|
4. Install `react-native-url-polyfill`
|
176
185
|
|
177
186
|
```console
|
@@ -183,48 +192,23 @@ npm install @microsoft/omnichannel-chat-sdk --save
|
|
183
192
|
```console
|
184
193
|
npm install @azure/core-asynciterator-polyfill --save-dev
|
185
194
|
```
|
186
|
-
|
187
|
-
|
188
|
-
|
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.
|
195
|
+
|
196
|
+
6. Update *metro.config.js* to use React Native compatible Node Core modules
|
197
|
+
|
202
198
|
```ts
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
}
|
212
|
-
},
|
199
|
+
module.exports = {
|
200
|
+
// ...
|
201
|
+
resolver: {
|
202
|
+
extraNodeModules: {
|
203
|
+
...require('node-libs-react-native'),
|
204
|
+
net: require.resolve('node-libs-react-native/mock/net'),
|
205
|
+
tls: require.resolve('node-libs-react-native/mock/tls')
|
206
|
+
}
|
207
|
+
}
|
213
208
|
};
|
214
209
|
```
|
215
|
-
|
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
|
210
|
+
|
211
|
+
7. Add the following *import* on top of your entry point file
|
228
212
|
|
229
213
|
```ts
|
230
214
|
import 'node-libs-react-native/globals';
|