我的问题来自文档:https://facebook.github.io/react-native/docs/asyncstorage.html#clear
AsyncStorage.clear - >删除所有客户端,库等的所有AsyncStorage ....
这是否意味着所有应用程序共享相同的AsyncStorage?
我的问题来自文档:https://facebook.github.io/react-native/docs/asyncstorage.html#clear
AsyncStorage.clear - >删除所有客户端,库等的所有AsyncStorage ....
这是否意味着所有应用程序共享相同的AsyncStorage?
1 回答
AsyncStorage在多个应用程序之间共享 not . 每个应用程序都运行它自己的沙箱环境,无法访问其他应用程序 .
调用AsyncStorage.clear仅表示您将删除应用程序存储在AsyncStorage中的所有数据 .
那包括
由使用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