react-native AsyncStorage 在 Playstore 更新之间是否持续存在? [英] Does react-native AsyncStorage persist between playstore updates?

查看:53
本文介绍了react-native AsyncStorage 在 Playstore 更新之间是否持续存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到任何关于此的信息.

I can't find anything about this.

我需要一种方法来在 Play 商店的应用程序更新之间保留数据,但我不确定 AsyncStorage 是否可以完成这项工作.我认为确实如此,因为在我执行的每个构建中,数据都在那里.

I need a way to persist data between app updates on the play store and I'm not sure if the AsyncStorage does the job. I assume it does, since on every build I perform, the data is there.

但我不确定商店中的不同版本.如果没有,我该如何处理?

But I'm not sure about different versioning in the store. If it doesn't, how could I handle this?

谢谢.

推荐答案

是的,AsyncStorage 会在更新之间保留数据,就像您拥有数据库一样.对于 Android,AsyncStorage 数据存储在链接到您的包 ID 的数据库中,除非卸载应用程序,否则不会被删除.AsyncStorage 对你来说应该足够了.来自 RN 文档:

Yes, the AsyncStorage keeps the data between updates like if you had had a database. For Android, AsyncStorage data is stored in a database that is linked to your package id and doesn't get deleted unless the app is uninstalled. AsyncStorage should be enough for you. From RN docs:

在 iOS 上,AsyncStorage 由存储小值的本机代码支持在序列化的字典中,在单独的文件中更大的值.上Android,AsyncStorage 将根据什么使用 RocksDB 或 SQLite可用.

On iOS, AsyncStorage is backed by native code that stores small values in a serialized dictionary and larger values in separate files. On Android, AsyncStorage will use either RocksDB or SQLite based on what is available.

这篇关于react-native AsyncStorage 在 Playstore 更新之间是否持续存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆