Tencent / MMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
Other
17.3k stars 1.9k forks source link

MMKV 在 App 重启后丢失数据 #1318

Closed SkyCJC closed 4 months ago

SkyCJC commented 4 months ago

目前反馈出现问题的机型是vivo x60,参考FAQ中的方案,适配了MULTI_PROCESS,期望app发布后,如果再次出现问题可以快速定位问题,这块的逻辑如何处理

lingol commented 4 months ago

First thing first, can you confirm if changing the mode to MULTI_PROCESS solved this problem?

Now as to diagnose and investigate things like that, check your logs and code. If you still don't have any clue, search Google about it -- there are plenty of issues about mmkv that you can search directly.

lingol commented 4 months ago

And if you still can't figure it out, come to GitHub with details of logs and ask for help. Remember, with logs.

SkyCJC commented 4 months ago

好的,我还想确定一点,如果app是多进程,哪怕是创建一个闲置进程,MMKV模式也是建议配置MULTI_PROCESS_MODE是吗

lingol commented 4 months ago

You only set that flag on mmkv that will be used in multiple processes.