react-native-documents / document-picker

Document Picker for React Native
https://react-native-documents.github.io/
MIT License
1.35k stars 437 forks source link

No documents listed on iOS #671

Closed saadalla closed 8 months ago

saadalla commented 1 year ago

I am using [react-native-document-picker] in react-native app. The picking page is displayed but with no images on both simulator and real device, but I already have photos on my phone. Help please

try { const response = await DocumentPicker.pickSingle({ //type: DocumentPicker.types.images, type: [DocumentPicker.types.allFiles], }); if (debug) console.log(mod, caller+" =>", response); } catch (err) { console.log(mod, caller, err); if (DocumentPicker.isCancel(err)) { console.log(mod, caller+" => Cancel !!"); setImage(undefined); return; } } setImage(response);

info Fetching system and libraries information... System: OS: macOS 13.4.1 CPU: (10) arm64 Apple M2 Pro Memory: 3.39 GB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.16.1 path: /usr/local/bin/node Yarn: version: 1.22.19 path: /usr/local/bin/yarn npm: version: 9.5.1 path: /usr/local/bin/npm Watchman: version: 2023.07.10.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /Users/saadalla/.rbenv/shims/pod SDKs: iOS SDK: Platforms:

saadalla commented 1 year ago

image

sergey-shablenko commented 1 year ago

+1

danieltvaz commented 1 year ago

Same. Nothing listed here.

JB712 commented 11 months ago

Same here on iOS (android working perfectly fine). Is it a permission problem ?

EDIT: my bad, I didn't knew that what is in Photos app is not considered in Files. You have to transfer them manually (by clicking Share > Save to Files)

danieltvaz commented 11 months ago

In my case, i'm trying to select an image to upload, so I just moved to this: https://github.com/react-native-image-picker/react-native-image-picker

works like a charm.

vonovak commented 8 months ago

Hello and thanks for asking, closing as resolved.

document picker on ios is like the Files app. For images, there are other options like https://github.com/react-native-image-picker/react-native-image-picker

Thank you 🙂