react-native-documents / document-picker

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

Isn't that necessary to request for user permission before accessing documents in iOS? #672

Closed Yandamuri closed 9 months ago

Yandamuri commented 11 months ago

Question

To access phots in iOS we need to request NSPhotoLibraryUsageDescription permission. But i didn't find any permission like that to access docs. When i use react-native-document-picker, I am able to access documents without any permission.

Is it normal behaviour in iOS that accessing documents without any permission?

vonovak commented 9 months ago

Hello and thanks for asking, we're not really accessing all documents of the user, only what they select. To compare with NSPhotoLibraryUsageDescription that you mentioned, you get access the the whole photo library. Thank you 🙂

Yandamuri commented 9 months ago

@vonovak Thank you for your response. Please excuse me for extending the closed question.

We cannot select any photos without having access to whole photo library(which is medium to select photos). But to select documents we do not required any medium and OS provides a convenient way to select any documents which includes

  1. Local and iCloud documents --> iniOS,
  2. Documents, Downloads, Twitter, Instagram(Folders created by respective apps), etc... --> In Android

Due to this reasonreact-native-document-pickerdoesn't required any permission to pic documents both in iOS and Android.

Please correct me if my assumption is wrong.