Is AsyncStorage shared across apps?

余生颓废 提交于 2019-12-06 05:06:14

问题


My question originates from the docs: https://facebook.github.io/react-native/docs/asyncstorage.html#clear

AsyncStorage.clear -> Erases all AsyncStorage for all clients, libraries, etc....

does that mean that all apps share the same AsyncStorage?


回答1:


AsyncStorage is not shared between multiple apps. Every app runs it it's own sandbox environment and has no access to other apps.

To call AsyncStorage.clear only means you will delete all data which your app has stored in AsyncStorage.

That includes

  • all data which was stored by a library that uses AsyncStorage like https://github.com/sunnylqm/react-native-storage
  • all data from all users (in case of multi user)

For more information about app sandboxing you can read this answer: What is Sandbox in ios , Can i Trans data between in one App to Another App in iPhone,if possible how



来源:https://stackoverflow.com/questions/48790764/is-asyncstorage-shared-across-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!