我的问题来自文档:https://facebook.github.io/react-native/docs/asyncstorage.html#clear
AsyncStorage.clear -> Erases all AsyncStorage for all clients, libraries, etc....
这是否意味着所有应用共享相同的AsyncStorage?
最佳答案
AsyncStorage是而不是在多个应用程序之间共享。每个应用程序都在其自己的沙盒环境中运行,并且无法访问其他应用程序。
仅调用AsyncStorage.clear意味着您将删除应用程序已存储在AsyncStorage中的所有数据。
包括
https://github.com/sunnylqm/react-native-storage
有关应用沙箱的更多信息,您可以阅读以下答案:
What is Sandbox in ios , Can i Trans data between in one App to Another App in iPhone,if possible how
关于react-native - 跨应用程序共享AsyncStorage吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48790764/