I'm on React Native 0.59.9/iOS 13 and my app utilizes external files a lot. If I present document/photo picker from within my app everything works fine. If I also go to a webpage (e.g. a PDF document in Safari) and tap share button and pick my app it also works great.
But, if I'm trying to read a file (even if it's the same file that I successfully read from the document picker within the app) that the user has picked using the share sheet by tapping "Open in (my app)..." in the share sheet from the regular Files.app in iOS, it fails with the error:
The file “(name of the file)” couldn’t be opened because you don’t have permission to view it.
I've seen several questions regarding the issue such as iOS 9 read file permission but the answers always involve native iOS solutions whereas I'm using React Native with react-native-fs
(repo) package to read the files (which works perfectly with all the files picked within the app).
How can I read externally picked files (using "Open in..." in Files) with React Native?
Note: (Before you ask) I'd need to handle any kind of file so a solution that involves loading photo/video assets from the photo library wouldn't be enough.