You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency (#2578)
* feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency
* chore: fix peerdeps and add dcos
* fix: deps version on package.json
* docs: add migration guide for v5 to v6
* docs: add migration guide for v5 to v6
* docs: add migration guide for v5 to v6
@@ -8,13 +8,13 @@ import TabItem from '@theme/TabItem';
8
8
9
9
Installation and usage of our Stream Chat React Native SDK is simple and involves the following steps:
10
10
11
-
###Prerequisites
11
+
## Prerequisites
12
12
13
13
First things first, make sure you have set up the development environment for React Native. You can find the official guide [here](https://reactnative.dev/docs/environment-setup).
14
14
15
15
For Expo, you can follow [this guide](https://docs.expo.dev/get-started/installation/).
16
16
17
-
###Add Stream's Chat SDK and its peer dependencies
17
+
## Add Stream's Chat SDK and its peer dependencies
18
18
19
19
In order to install the Stream Chat React Native SDK, run the following command in your terminal of choice:
20
20
@@ -56,15 +56,15 @@ Stream Chat React Native SDK requires installing some peer dependencies to provi
-[`@react-native-camera-roll/camera-roll`](https://github.com/react-native-cameraroll/react-native-cameraroll) for accessing device gallery.
86
-
-[`@react-native-community/netinfo`](https://github.com/react-native-netinfo/react-native-netinfo) for accessing device gallery.
87
-
-[`@stream-io/flat-list-mvcp`](https://github.com/GetStream/flat-list-mvcp) for bi-directional FlatList support.
88
-
-[`react-native-fs`](https://github.com/itinance/react-native-fs) to perform file operations like save, delete, etc.
86
+
-[`@react-native-community/netinfo`](https://github.com/react-native-netinfo/react-native-netinfo) for SDK to respond to network changes.
89
87
-[`react-native-gesture-handler`](https://github.com/software-mansion/react-native-gesture-handler) to handle gestures within the SDK.
90
88
-[`react-native-image-crop-picker`](https://github.com/ivpusic/react-native-image-crop-picker) to capture images to attach them in the message.
91
89
-[`@bam.tech/react-native-image-resizer`](https://github.com/bamlab/react-native-image-resizer) to compress image uploads.
@@ -96,9 +94,7 @@ values={[
96
94
<TabItemvalue="expo">
97
95
98
96
-[`expo-media-library`](https://docs.expo.dev/versions/latest/sdk/media-library/) for accessing device gallery.
99
-
-[`@react-native-community/netinfo`](https://github.com/react-native-netinfo/react-native-netinfo) for accessing device gallery.
100
-
-[`@stream-io/flat-list-mvcp`](https://github.com/GetStream/flat-list-mvcp) for bi-directional FlatList support.
101
-
-[`expo-file-system`](https://docs.expo.dev/versions/latest/sdk/filesystem/) to perform file operations like save, delete, etc.
97
+
-[`@react-native-community/netinfo`](https://github.com/react-native-netinfo/react-native-netinfo) for SDK to respond to network changes.
102
98
-[`react-native-gesture-handler`](https://github.com/software-mansion/react-native-gesture-handler) to handle gestures within the SDK.
103
99
-[`expo-image-picker`](https://docs.expo.dev/versions/latest/sdk/imagepicker/) to capture images to attach them in the message.
104
100
-[`expo-image-manipulator`](https://docs.expo.dev/versions/latest/sdk/imagemanipulator/) to compress image uploads.
@@ -108,9 +104,214 @@ values={[
108
104
</TabItem>
109
105
</Tabs>
110
106
111
-
### Optional Dependencies
107
+
##Opt-in features
112
108
113
-
There are a few optional dependencies that can be added to have more features within the SDK.
109
+
There are a few features that can be optionally added within the SDK, which would need additional dependencies to be installed. These features are:
110
+
111
+
### Video playing
112
+
113
+
Play video and audio attachments within messages in the chat.
114
+
115
+
<Tabs
116
+
defaultValue='rncli'
117
+
groupId='rn-platform'
118
+
values={[
119
+
{ label: 'RN CLI', value: 'rncli' },
120
+
{ label: 'Expo', value: 'expo' },
121
+
]}
122
+
>
123
+
<TabItemvalue='rncli'>
124
+
125
+
```bash title="Terminal"
126
+
yarn add react-native-video
127
+
```
128
+
129
+
</TabItem>
130
+
<TabItemvalue='expo'>
131
+
132
+
```bash title="Terminal"
133
+
npx expo install expo-av
134
+
```
135
+
136
+
</TabItem>
137
+
138
+
</Tabs>
139
+
140
+
### Voice recording
141
+
142
+
Record and send voice messages and play them back within the chat.
The overall installation of the optional dependencies would look like this:
114
315
115
316
<Tabs
116
317
defaultValue='rncli'
@@ -124,6 +325,7 @@ values={[
124
325
125
326
-[`react-native-video`](https://github.com/react-native-video/react-native-video) for Video and Audio playback support.
126
327
-[`react-native-audio-recorder-player`](https://github.com/hyochan/react-native-audio-recorder-player) for Audio recording and async audio messages support.
328
+
-[`react-native-blob-util`](https://github.com/RonRadtke/react-native-blob-util) to perform file operations like save, delete, while sharing or access the cache directory while audio recording.
127
329
-[`react-native-share`](https://github.com/react-native-share/react-native-share) for Attachment sharing support.
128
330
-[`react-native-haptic-feedback`](https://github.com/junina-de/react-native-haptic-feedback) for user haptics feedback.
129
331
-[`@react-native-clipboard/clipboard`](https://github.com/react-native-clipboard/clipboard) for Copy message support.
@@ -134,6 +336,7 @@ values={[
134
336
<TabItemvalue="expo">
135
337
136
338
-[`expo-av`](https://docs.expo.dev/versions/latest/sdk/av/) for Video and Audio playback, recording and async audio messages support.
339
+
-[`expo-file-system`](https://docs.expo.dev/versions/latest/sdk/filesystem/) to perform file operations like save, delete, while sharing or access the cache directory while audio recording.
137
340
-[`expo-sharing`](https://docs.expo.dev/versions/latest/sdk/sharing/) for Attachments sharing support.
138
341
-[`expo-haptics`](https://docs.expo.dev/versions/latest/sdk/haptics/) for user haptics support.
139
342
-[`expo-clipboard`](https://docs.expo.dev/versions/latest/sdk/clipboard/) for Copy message support.
@@ -147,7 +350,7 @@ values={[
147
350
Please follow along the linked documentation of each optional dependencies so as to support them correctly in your application.
148
351
:::
149
352
150
-
###Configuring permissions
353
+
## Configuring permissions
151
354
152
355
Some dependencies(if you are using them on your application), require you to add additional permissions to the `Info.plist` file in iOS and `AndroidManifest.xml` file in Android. Please follow the steps mentioned in the links below for corresponding dependencies:
153
356
@@ -232,7 +435,7 @@ For Android on Expo, most of the most permissions are added automatically by lib
232
435
</TabItem>
233
436
</Tabs>
234
437
235
-
###Additional Steps
438
+
## Additional Steps
236
439
237
440
Some dependencies require us to make changes to our application for all functionalities to be available.
0 commit comments