alpha0010 / react-native-file-access

Filesystem access for React Native
MIT License
298 stars 18 forks source link

Can't see file downloaded in ios files app #46

Closed informsharique closed 2 years ago

informsharique commented 2 years ago

I use this -> await FileSystem.cpExternal(`${Dirs.CacheDir}/private_key_${fileName}.txt`, `app_${fileName}.txt`,'downloads') to download file in android and this -> await FileSystem.writeFile(`${Dirs.DocumentDir}/app_${fileName}.txt`, pk); to download in ios. Its says successful in both the cases. I can check the downloads directory in android and the file is indeed there but incase of ios I cannot see the file in files app. I have already enabled UIFileSharingEnabled and LSSupportsOpeningDocumentsInPlace in the Info.plist file. Tried using FileSystem.cp as well and also FileSystem.cpExternal for ios but no luck getting the file in files app. Am I missing something or we can't see the file in the files app at all?

alpha0010 commented 2 years ago

Hmm, sounds like you did the correct steps... You could try enabling UISupportsDocumentBrowser. Also, you could try rebooting the device. iOS sometimes fails to update app permissions in dev mode.

Is this simulator, or physical device?

alpha0010 commented 2 years ago

Assuming resolved. Please open a new issue if not.