Releases: Tencent/MMKV
v1.3.14
v1.3.14 / 2025-05-13
This is a Long Term Support (LTS) release.
This is a hot-fix release for Android/iOS/macOS users. So it is only available on Maven Central and CocoaPods.
Android
- Support 16K pagesize.
- Fix a potential log callback OOM crash.
- Upgrade to NDK r28.1 to have full support of 16K pagesize.
iOS
- Retain the callback handler to prevent a potential short-lived callback handler from crashing.
v2.2.2
v2.2.2 / 2025-05-08
This is a hot fix version mainly for Android/Linux platforms. It’s highly recommended for v2.2.0~v2.2.1 users.
Changes for All platforms
- Improve file lock consistency for Mayfly FD MMKV instances.
Android
- Fix a potential ANR on multi-process mode MMKV init/creation.
POSIX
- Fix a potential ANR on multi-process mode MMKV init/creation on Linux.
iOS/macOS
- Retain the callback handler to prevent a potential short-lived callback handler from crashing.
Win32
- Improve efficiency on MMKV instance init/creation.
v2.2.1
v2.2.0
v2.2.0 / 2025-04-24
We introduce the Mayfly FD (short-lived file descriptor) enhancement, reducing MMKV's fd footprint by half and more. For a single-process mode MMKV instance, the fd footprint is reduced to zero (except Android/OHOS, details below). For a multi-process mode MMKV instance, the fd footprint is reduced by half, for we still need a long-lived fd to inter-process lock the shared memory.
Changes for All platforms
- Add Mayfly FD (short-lived file descriptor) enhancement.
- Improve multi-process access efficiency by about 20%.
- Add
checkExist()
to check if a MMKV instance exists on disk. - Drop deprecated armv7 AES hardware acceleration.
Android
- Reduce the fd footprint by half. For a single-process mode MMKV instance, we still need a long-lived fd to support the process-mode checker and legacy name upgrading. In the far future, when all legacy names have been upgraded, we might drop the long-lived fd like other platforms.
- Upgrade Android compileSdk/targetSdk to 35, NDK to 28.1, Java to 11, Gradle to 8.11.1, and AGP to 8.9.2.
HarmonyOS NEXT
- Reduce the fd footprint by half. For a single-process mode MMKV instance, we still need a long-lived fd to support the legacy name upgrading. In the far future, when all legacy names have been upgraded, we might drop the long-lived fd like other platforms.
- Drop
checkProcessMode()
, it’s never been used. - Improve obfuscation configuration with relative path.
iOS
- Add
+mmkvGroupPath
to get the group folder for MMKV multi-process storage.
v2.1.0
v2.1.0 / 2025-02-18
Happy Chinese New Year!
This is a breaking change version for the Android/OHOS platform. Read the change log bellow and upgrade carefully.
Changes for All platforms
- Add the
NameSpace
feature that easily supports customizing a root directory. - Add protection from bad disk records of MMKV files.
- Fix FileLock not being unlocked on destruction.
- Improve directory creation on
ReadOnly
mode.
Android
- Breaking change: Migrate legacy MMKV in a custom directory to normal MMKV. Historically Android/OHOS mistakenly use mmapKey as mmapID, which will be problematic with the
NameSpace
feature. Starting from v2.1.0, MMKV will try to migrate them back to normal when possible.
It's highly recommended that you upgrade to v2.0.2/v1.3.11 first with forward support of normal MMKV in a custom directory. - Supports using MMKV directly in C++ code.
- Improve inter-process locking by using
F_OFD_SETLK
instead ofF_SETLK
. - Add experimental protection from bad disk records of MMKV files.
HarmonyOS NEXT
- Breaking change: Migrate legacy MMKV in a custom directory to normal MMKV. Historically Android/OHOS mistakenly use mmapKey as mmapID, which will be problematic with the
NameSpace
feature. Starting from v2.1.0, MMKV will try to migrate them back to normal when possible.
It's highly recommended that you upgrade to v2.0.2/v1.3.11 first with forward support of normal MMKV in a custom directory. - Supports using MMKV directly in C++ code.
- Improve inter-process locking by using
F_OFD_SETLK
instead ofF_SETLK
. - Add experimental protection from bad disk records of MMKV files.
iOS/macOS
- Upgrade to iOS 13, macOS 10.15, and watchOS 6 to support the
NameSpace
functionality. - Supports using MMKV directly in C++ code.
- Drop the background
mlock()
protection given that we are iOS 13+. - Add tested protection from bad disk records of MMKV files.
- Fix a package error when using MMKV by submodule.
Flutter
- Remove unused imports and fix deprecated implementations.
- Support flutter 3.29.
Win32
- Add tested protection from bad disk records of MMKV files.
POSIX
- Improve inter-process locking by using
F_OFD_SETLK
instead ofF_SETLK
. - Add experimental protection from bad disk records of MMKV files.
- Fix a compile error on the GNU toolchain.
Golang
- Fix a link error in the armv8 arch.
- Improve multi-platform building.
v1.3.13
v1.3.12
v1.3.12 / 2025-01-02
This is a Long Term Support (LTS) release.
Changes for All platforms
- Fix a bug that MMKV might fail to backup/restore across different filesystems.
- Add protection from invalid value size of auto-key-expire mmkv.
Android
- Add forward support for the correct filename with a custom root path.
HarmonyOS NEXT
- Add forward support for the correct filename with a custom root path.
- Obfuscation fully supported.
v2.0.2
v2.0.2 / 2024-12-27
Mary holiday and a happy new year!
For all those who suffer from incorrect file names in Android/OHOS, we are planning a new feature called NameSpace, specifically, and will solve this problem once and for all. Under this feature, a previously incorrect file name will be migrated to the correct file name under a custom root path.
However, this also means that once upgraded, the file will no longer be accessed by older versions of MMKV/your App, which will be a problem if your team member or your users do some downgrade operation. To address this issue, we have provided a forward support version of MMKV that supports reading upgraded/correct file names, and it's released as v2.0.2.
So please upgrade to v2.0.2 and get prepared for this shiny new feature NameSpace.
Changes for All platforms
- Fix a bug that MMKV might fail to backup/restore across different filesystems.
- Add protection from invalid value size of auto-key-expire mmkv.
Android
- If the running App is 32-bit only, warn about it (by throwing
UnsupportedArchitectureException
) before trying to load native lib. - Add forward support for the correct filename with a custom root path.
HarmonyOS NEXT
- Obfuscation fully supported.
- Use atomic file rename on OHOS.
- Add forward support for the correct filename with a custom root path.
Win32
- Only
mmap()
onftruncate()
/zeroFillFile()
failure iff we have a valid file mapping before.
v2.0.1
v2.0.1 / 2024-11-12
This is a hotfix release.
Changes for All platforms
- Fix a bug that might cause MMKV to become dead-locked for other threads after decoding container-type values. The affected platforms and value types are listed below. So don't be surprised if you find no update on the unaffected platforms.
HarmonyOS NEXT
- Fix a bug that MMKV might become dead-locked for other threads after
decodeStringSet()
/decodeNumberSet
/decodeBoolSet
or decodingTypedArray
.
Flutter
- Fix the bug on HarmonyOS NEXT listed above. A version named v2.0.1 was added to fix the Android version conflict between the LTS series & v2.0. Thanks to the federated plugins framework, only the underlying
mmkv_ohos
plugin is upgraded, themmkv
plugin stays the same.
POSIX
- Fix a bug that MMKV might become dead-locked for other threads after decoding
std::vector<T>
orstd::span<T>
values.
v1.3.11 LTS
v1.3.11 / 2024-11-12
This is a Long Term Support (LTS) release.
Changes for All platforms
- Fix a bug that might cause MMKV to become dead-locked for other threads after decoding container-type values. The affected platforms and value types are listed below. So don't be surprised if you find no update on the unaffected platforms.
HarmonyOS NEXT
- Fix a bug that MMKV might become dead-locked for other threads after
decodeStringSet()
/decodeNumberSet
/decodeBoolSet
or decodingTypedArray
.
Flutter
- Fix the bug on HarmonyOS NEXT listed above. A temp version named v1.3.10 was added to fix the Android version conflict between the LTS series & v2.0. To avoid potential confusion, bump both versions to v1.3.11.
POSIX
- Fix a bug that MMKV might become dead-locked for other threads after decoding
std::vector<T>
orstd::span<T>
values.