Skip to content

Commit 061910d

Browse files
Merge pull request #94 from GetStream/vishal/image-picker-fix
CRNS-34: Fixing examples and readme for image picker functionality
2 parents 564d801 + 058ce40 commit 061910d

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ This repo includes 2 example apps. One that's used with Expo, and one for native
5454
react-native run-android
5555
```
5656

57+
If you run into following error on android:
58+
59+
```bash
60+
Execution failed for task ':app:validateSigningDebug'.
61+
> Keystore file '/path_to_project/stream-chat-react-native/examples/NativeMessaging/android/app/debug.keystore' not found for signing config 'debug'.
62+
```
63+
64+
You can generate the debug keystore by running this command in the `android/app/` directory: `keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000` - [Reference](https://github.com/facebook/react-native/issues/25629#issuecomment-511209583)
65+
5766
## Docs
5867

5968
The [styleguidist docs for stream-chat-react-native](https://getstream.github.io/stream-chat-react-native/) document how all the components work.
@@ -148,6 +157,10 @@ react-native link react-native-gesture-handler
148157
react-native link react-native-reanimated
149158
```
150159
160+
If you are planning to use image picker, there are some additional steps to be done. You can find them here - https://github.com/react-native-community/react-native-image-picker/blob/master/docs/Install.md
161+
162+
If you are planning to use file/document picker, you need to enable iCloud capability in your app - https://github.com/Elyx0/react-native-document-picker#reminder
163+
151164
and finally
152165
153166
```bash
@@ -181,6 +194,10 @@ yarn add react-native-gesture-handler react-native-reanimated
181194
cd ios && pod install && cd ..
182195
```
183196
197+
If you are planning to use image picker, there are some additional steps to be done. You can find them here - https://github.com/react-native-community/react-native-image-picker/blob/master/docs/Install.md
198+
199+
If you are planning to use file/document picker, you need to enable iCloud capability in your app - https://github.com/Elyx0/react-native-document-picker#reminder
200+
184201
and finally
185202
186203
**iOS**:

examples/NativeMessaging/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
package="com.nativemessaging">
33

44
<uses-permission android:name="android.permission.INTERNET" />
5+
<uses-permission android:name="android.permission.CAMERA" />
6+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
57

68
<application
79
android:name=".MainApplication"

examples/NativeMessaging/ios/NativeMessaging/Info.plist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,13 @@
5353
</array>
5454
<key>UIViewControllerBasedStatusBarAppearance</key>
5555
<false/>
56+
<key>NSPhotoLibraryUsageDescription</key>
57+
<string>$(PRODUCT_NAME) would like access to your photo gallery</string>
58+
<key>NSCameraUsageDescription</key>
59+
<string>$(PRODUCT_NAME) would like to use your camera</string>
60+
<key>NSPhotoLibraryAddUsageDescription</key>
61+
<string>$(PRODUCT_NAME) would like to save photos to your photo gallery</string>
62+
<key>NSMicrophoneUsageDescription</key>
63+
<string>$(PRODUCT_NAME) would like to use your microphone (for videos)</string>
5664
</dict>
5765
</plist>

0 commit comments

Comments
 (0)