[iOS] AsyncStorage data persists after uninstalling and re-installing app
See original GitHub issueCurrent behavior
Using the latest stable release (1.9.0), AsyncStorage items that are set persist after an iOS app is uninstalled and then re-installed.
Expected behavior
AsyncStorage should be completely clear after uninstalling/reinstalling an app. This is how the framework bundled AsyncStorage behaves, so one would expect the community version to function the same way. If this persistence is intentional, it should be documented (as far as I can tell there is nothing in the docs that would explain this behavior, but I might have missed something). Apologies if I am mistaken or if this issue has been reported already.
Repro steps
AsyncStorage.setItem('someKey', 'someData');
- Uninstall iOS app
- Re-install iOS app
const data = AsyncStorage.getItem('someKey'); // returns someData
Environment
- Async Storage version: 1.9.0
- React-Native version: 0.62.2
- Platform tested: iOS 13.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:17
- Comments:23 (5 by maintainers)
Top Results From Across the Web
Is AsyncStorage still remain after update app to new codebase?
If the user does not uninstall the app and installs it again, the AsyncStorage will not be cleared. Taking into account that the...
Read more >Is Storing data in LocalStorage is going to be removed if ...
Async storage stores data in the app space. This means that it will get removed when the app is uninstalled. If you want...
Read more >iOS autodelete Keychain items afte… | Apple Developer Forums
I seem to recall that an app's keychain items would be deleted by iOS some X days/hours/minutes after an app is deleted, however...
Read more >Clear all project state on the device | Voters - Expo - Canny
I looking for a way to clear a cache on published Expo app on iOS. ... you can do is completely uninstall the...
Read more >Store key-value data on disk - Flutter documentation
Fortunately, the shared_preferences plugin can be used to persist key-value data on disk. The shared preferences plugin wraps NSUserDefaults on iOS and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Since we’re storing data in
Application Support
directory, it’s backed up by default.We need a way to opt out from doing that. Going to work on that in upcoming days
@Krizzu we’d be happy to try a beta build that has the final implementation of your proposed feature – I’ve commented on your PR for now with some further thoughts. This is affecting our app in production, so we’re comfortable testing an appropriate beta build in our normal QA process.