Skip to content

Commit ad7f5f2

Browse files
committed
ComposeMenu: Offer file picker on iOS, not just Android
I've just tested on my iPhone (13 Pro, running iOS 16.1), and I was able to upload a file just fine after this change. That was easy! Fixes: #4586
1 parent 22b8c67 commit ad7f5f2

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

ios/Podfile.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ PODS:
310310
- glog
311311
- react-native-cameraroll (5.0.4):
312312
- React-Core
313+
- react-native-document-picker (8.1.3):
314+
- React-Core
313315
- react-native-image-picker (4.10.2):
314316
- React-Core
315317
- react-native-netinfo (6.0.0):
@@ -506,6 +508,7 @@ DEPENDENCIES:
506508
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
507509
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
508510
- "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)"
511+
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
509512
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
510513
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
511514
- react-native-photo-view (from `../node_modules/react-native-photo-view`)
@@ -619,6 +622,8 @@ EXTERNAL SOURCES:
619622
:path: "../node_modules/react-native/ReactCommon/logger"
620623
react-native-cameraroll:
621624
:path: "../node_modules/@react-native-camera-roll/camera-roll"
625+
react-native-document-picker:
626+
:path: "../node_modules/react-native-document-picker"
622627
react-native-image-picker:
623628
:path: "../node_modules/react-native-image-picker"
624629
react-native-netinfo:
@@ -723,6 +728,7 @@ SPEC CHECKSUMS:
723728
React-jsinspector: eb202e43b3879aba9a14f3f65788aec85d4e1ea9
724729
React-logger: 98f663b292a60967ebbc6d803ae96c1381183b6d
725730
react-native-cameraroll: 38b40d9033e4077b6c603f92f95c6d05fa7907df
731+
react-native-document-picker: 958e2bc82e128be69055be261aeac8d872c8d34c
726732
react-native-image-picker: bf34f3f516d139ed3e24c5f5a381a91819e349ea
727733
react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d
728734
react-native-photo-view: ea0ec91bf5991a6843e740b1f47ab355171c996c

react-native.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ module.exports = {
1616
* https://github.com/react-native-community/cli/blob/master/docs/autolinking.md.
1717
*/
1818
dependencies: {
19-
'react-native-document-picker': {
20-
platforms: {
21-
// iOS file uploads aren't supported yet. See 250cde501.
22-
ios: null,
23-
},
24-
},
2519
'react-native-vector-icons': {
2620
platforms: {
2721
// We're using a setup that doesn't involve linking

src/compose/ComposeMenu.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ export default function ComposeMenu(props: Props): Node {
239239

240240
return (
241241
<View style={styles.container}>
242-
{Platform.OS === 'android' && (
243-
<MenuButton onPress={handleFilesPicker} IconComponent={IconAttach} />
244-
)}
242+
<MenuButton onPress={handleFilesPicker} IconComponent={IconAttach} />
245243
<MenuButton onPress={handleImagePicker} IconComponent={IconImage} />
246244
<MenuButton onPress={handleCameraCapture} IconComponent={IconCamera} />
247245
{insertVideoCallLink !== null ? (

0 commit comments

Comments
 (0)