react-native-fs icon indicating copy to clipboard operation
react-native-fs copied to clipboard

[iOS/macOS] Files outside the sandbox, picked by `pickFile()`, can't be accessed by other library methods

Open birdofpreyru opened this issue 2 years ago • 2 comments

More precisely, in case of macOS this is true for files outside the app sandbox, for iOS it applies for files from iCloud. The problem is that current conversion of security-scoped URLs into string URLs returned by pickFile() looses the security-scope permissions.

birdofpreyru avatar Jan 29 '24 15:01 birdofpreyru

As of v2.23.0 the issue is fixed for pickFile(), copyFile(), and exists(). Other functions, most probably, require additional fixes to correctly handle the special «Bookmark URLs» returned now by pickFile() on iOS & macOS (in the absence of these fixes other methods are not expected to crash in any dramatic way, most probably they'll just consider such URLs point to non-existing files).

birdofpreyru avatar Jan 29 '24 23:01 birdofpreyru

Since v2.27.1 «Bookmark URLs» are, presumably, supported by readDir() and readdir() methods (implemented, pending to be tested).

birdofpreyru avatar Jun 15 '24 14:06 birdofpreyru