Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Picker Issue on iOS Devices #738

Closed
MashoodAli-Official opened this issue Sep 13, 2024 · 3 comments
Closed

Document Picker Issue on iOS Devices #738

MashoodAli-Official opened this issue Sep 13, 2024 · 3 comments

Comments

@MashoodAli-Official
Copy link

Hi All!
I have been using the Document Picker for a long time, but I recently faced an issue on iOS devices. Before explaining the issue, I would like to mention that I have tested the application both in a simulator and on an iOS device during development. Additionally, I have tested the app in production. However, the Document Picker is only functioning properly on Android.

Issue Details:
Whenever I try to pick a document on an iOS device or simulator, it does not work unless the document file name follows specific formats, such as:
Document-File.pdf
Document_File.pdf
DocumentFile.pdf

If the document name does not contain a blank space, the document will not attach and just show a console warning in the Simulator.
screenshot
screenshot
In contrast, it works fine on Android devices/emulators without the need to remove blank spaces from the file name.

Project info:
"react": "^18.3.1",
"react-native": "0.74.3",
"react-native-date-picker": "^5.0.2",

@ericchan3721
Copy link

It's not related to the Document Picker itself, you may take a look on this issue.

@MashoodAli-Official
Copy link
Author

It's not related to the Document Picker itself, you may take a look on this issue.

Right now I am using RNFS so I don't want to use Expo file system.

@vonovak
Copy link
Collaborator

vonovak commented Sep 20, 2024

Hello and thanks for asking,
the returned uri is percent-encoded. You need to use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI when you pass it over to RNFS.

Thank you 🙂

@vonovak vonovak closed this as completed Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants