An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
clearAll()
call may fail to take effect in multi-process mode.compileSdkVersion
& targetSdkVersion
from 30
to 31
.libc++
by default. Starting from v1.2.11, com.tencent:mmkv-static
is the same as com.tencent:mmkv
.libc++_shared
, you could use com.tencent:mmkv-shared
instead.This version is mainly for Android & Flutter.
MMKV.mmkvWithID()
from returning null
to throwing exceptions on any error.MMKV.actualSize()
to get the actual used size of the file.MMKV.commit()
& MMKV.apply()
as deprecated, to avoid some misuse after migration from SharedPreferences to MMKV.This version is mainly for Android & Flutter.
libc++
, we have decided to upgrade MMKV's building NDK in this release. That means we can't support armeabi anymore. Those who still in need of armeabi can build from sources by following the instruction in the wiki.We really appreciate your understanding.
MMKV.encodeString()
with an empty string value on Android, MMKV.decodeString()
will return null
.MMKV.defaultMMKV()
on Android might fail to load, you can try calling MMKV.defaultMMKV(cryptKey: '\u{2}U')
with an encrytion key '\u{2}U'
instead.This will be the last version that supports armeabi arch on Android. To avoid some crashed on the old NDK (r16b), and make the most of a more stable libc++
, we have decided to upgrade MMKV's building NDK in the next release. That means we can't support armeabi anymore.
We really appreciate your understanding.
MMKV.disableProcessModeChecker()
. There are some native crash reports due to the process mode checker. You can disable it manually.MMKV.initialize()
to customize the root directory, a context
parameter is required now.encodeString()
with an empty string value.Known Issue on Flutter
encodeString()
with an empty string value on Android, decodeString()
will return null
. This bug will be fixed in the next version of Android Native Lib. iOS does not have such a bug.Happy holidays everyone!
sync()
with false
won't do msync()
asynchronous and won't return immediately.putStringSet()
with null
.MMKV.initialize()
with both Context
and LibLoader
parammeters.Add golang for POSIX platforms. Most things actually work!. Check out the wiki for information.
Add MMKV support for Golang on POSIX platforms. Most things actually work!
Check out the wiki for more info.
reKey()
after removeKeys()
has just been called.MMKV_DISABLE_CRYPT
is set.MMKV_DISABLE_FLUTTER
to disable flutter plugin features. If you integrate MMKV by source code, and if you are pretty sure the flutter plugin is not needed, you can turn that off to save some binary size.Add MMKV support for Flutter on iOS & Android platform. Most things actually work!
Check out the wiki for more info.
This is a pre-version for Flutter. The official Flutter plugin of MMKV will come out soon. Stay Tune!
<NSCoding>
objects.+[MMKV pageSize]
, +[MMKV version]
methods.+[MMKV defaultMMKVWithCryptKey:]
, you can encrypt the default MMKV instance now, just like the Android users who already enjoy this for a long time.-[MMKV getValueSizeForKey:]
to -[MMKV getValueSizeForKey: actualSize:]
to align with Android interface.MMKV.version()
method.