-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
FAQ
-
When should I use MMKV?
If those scenarios seen familar to you, you should choose MMKV:- Your iOS/Android App needs a generic key-value storage;
- You worry about writing efficency;
- Inter-process access causing your Android App ANR.
-
Is Swift supported?
Yes, MMKV is Swift compatible. For detail usage, see demo. -
Is Kotlin supported?
Yes, MMKV works perfectly in Java and Kotlin. For detail usage, see demo. -
What kind of encryption algorithm is MMKV used?
MMKV uses AES CFB-128 for encryption and decryption, using OpenSSL's implemetation (version 1.1.0i). We choose CFB instead of widely used CBC, mainly because MMKV implements insert/update by append-only operation. Stream encryption algorithms like CFB are more suitable. -
What're MMKV's limitations?
MMKV works perfectly well on most case, the size and length of keys and values is unlimited. However, since MMKV caches everything in memory, if the total size is too big (like 100M+), App may receive memory warning. And write speed might slow down when a full write back is needed. We do have a plan to supporting big files, hopefully will come out in next major release. -
Does MMKV for iOS support multi-process accessing?
No, MMKV for iOS currently doesn't support mulit-process accessing. Generly speaking, iOS App can't have multi-process running due to OS limitations. Should you have such use case, descript your scenario in issues. We'll consider it if there're huge needs. -
What is Ashmem MMKV in Android, and when should I use it? Why there's no such thing in MMKV for iOS?
Ashmem MMKV in Android is a memory-only, inter-process sharing key-value storage. It vanishes when all processes of the App exit. It doesn't use any file as a backing storage. Thus it's suitable for sharing sensitive information among processes of the same App. iOS doesn't have mult-process running in mose case, you could just use any key-value container as you like. -
I having
java.lang.UnsatisfiedLinkError
on Android devices with API level 19. What is that, and what should I do?
Some Android devices with API level 19 might have problem when installing/updating APK, aka missing libmmkv.so. There's a opensource project ReLinker that fix this problem. You can use it to load MMKV by callingMMKV.initialize(String rootDir, LibLoader loader)
. Example code can be found in mmkvdemo. -
Can I redirect / turn off MMKV's logging?
Yes. There're APIs added to turn off logging & redirect logging in v1.0.17.
MMKV is published under the BSD 3-Clause license. For details check out the LICENSE.TXT.
Check out the CHANGELOG.md for details of change history.
If you are interested in contributing, check out the CONTRIBUTING.md, also join our Tencent OpenSource Plan.
To give clarity of what is expected of our members, MMKV has adopted the code of conduct defined by the Contributor Covenant, which is widely used. And we think it articulates our values well. For more, check out the Code of Conduct.
Check out the FAQ first. Should there be any questions, don't hesitate to create issues.
User privacy is taken very seriously: MMKV does not obtain, collect or upload any personal information. Please refer to the MMKV SDK Personal Information Protection Rules for details.
- In English
- 中文
- In English
- 中文
- In English
- 中文
-
In English
-
中文
-
Golang