AsyncStorage 是永久的吗?

Is AsyncStorage permanent?

我正在将应用程序的授权令牌存储在 AsyncStorage 中。似乎在 Android 和 iOS 上(不太确定这个),在长时间不活动(~2 周)后,用户会注销。 我确定这与服务器无关。

AsyncStorage 是永久的吗?

编辑:嗯,这很尴尬。问题出在服务器上,不是 AsyncStorage 的错。

来自 RN 文档 https://facebook.github.io/react-native/docs/asyncstorage.html

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.

数据库和文件对我来说都是永久性的。也许您的用户正在以某种方式清除您应用的缓存或本地文件?