Skip to content

Visible RCTAsyncLocalStorage_V1 folder in IOS while i allow user to see Documents Directory to access Downloaded files. #222

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

Closed
ahmad6242 opened this issue Oct 7, 2019 · 8 comments

Comments

@ahmad6242
Copy link

Motivation

This case is only for IOS devices because in android we can save files in many other locations.(i am using RNFetchBlob to save files)
but in IOS it is only allowing to save files in documents directory.

From the Application User can download PDF files, i am storing these files in documents directory,
i am allowing this in info plist so user can access and open the Downloaded files.

UIFileSharingEnabled

UISupportsDocumentBrowser

LSSupportsOpeningDocumentsInPlace

in that directory we have folder called RCTAsyncLocalStorage_V1 in which all the locally stored data is there in a manifest.json file
this allows user to see all the raw data that can be used to do some hacking or playing around with things.

Description

is there any other way possible that we hide that directory or use some other method rather than crating a file to store data locally.

New feature implementation

If we are able to implement such thing we can hide sensitive data from the end users.

Please let me know if anything is possible here.

@krizzu krizzu added the LEGACY label Oct 7, 2019
@JJMoon
Copy link

JJMoon commented Oct 23, 2019

I guess there are some directories in iOS Apps.
In RNFS [https://github.com/itinance/react-native-fs#constants] there is LibraryDirectoryPath.
Can it be used as an alternative?
Or.
Can it be invisible folder? (like .RCTAsyncLocalStorage)

@krizzu
Copy link
Member

krizzu commented Dec 3, 2019

@ahmad6242 sorry for late response,

Currently there's no way to change the destination directory for iOS

@tido64
Copy link
Member

tido64 commented Feb 13, 2020

We've just merged #274 which should resolve this issue. The folder has been moved to Application Support. It would be great if you could try out latest master and let us know how it works for you.

@krizzu, did we cut a new release yet?

@tido64 tido64 closed this as completed Feb 13, 2020
@krizzu
Copy link
Member

krizzu commented Feb 16, 2020

@tido64 Not yet, I plan to do this soon.

@ybonnetain
Copy link

Hi There
Would you be so keen to tell me how the migration is handled. If I already have a manifest in /Documents on deployed instances, is it migrated to the app’s Library folder ?

@krizzu
Copy link
Member

krizzu commented Dec 6, 2020

I know it's not ideal, but here's a code that does the migration. It's well documented so it's easy to tell what's going on

@yash-sage
Copy link

Hi, I've enabled the same flag UISupportsDocumentBrowser and using the latest 1.14.1 version of @react-native-async-storage/async-storage. But, I can still see the RCTAsyncLocalStorage_V1 folder in iOS File Manager.
Is there a particular code that I need to modify to change the saved directory from Documents to Application Support

@krizzu
Copy link
Member

krizzu commented Mar 1, 2021

@yash-sage Hey,

No, the migration is handled at app start and no additional code is necessary. The RCTAsyncLocalStorage_V1 in documents is one used by bundled Async Storage that comes with React Native - we don't remove it to not lose any data and avoid conflicts with dependencies still using bundled AS. The data from this folder is migrated to Application support and this Async Storage is using it.

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

6 participants