Skip to content

Releases: Tencent/MMKV

v1.3.16

03 Dec 12:28

Choose a tag to compare

v1.3.16 / 2025-12-03

This is a Long Term Support (LTS) release.

All Platforms

  • Fix: Fixed an issue where the file size could change during multi-process loading.
  • Fix: Corrected a bug where a single key could be overridden incorrectly when upgrading from a v1.1.x version.

Android

  • Note: Version v1.3.15 mistakenly handled AIDL and should be considered a temporary, unstable release. If you find yourself on this version, you must upgrade to v1.3.16.

v2.3.0

02 Dec 12:28
381b969

Choose a tag to compare

v2.3.0 / 2025-12-03 (Breaking Change)

This release is a breaking change and introduces AES-256 encryption for enhanced security.

All Platforms

  • Feature: Added AES-256 encryption functionality. To upgrade an existing encrypted MMKV instance to AES-256, first load it using the old key. Then, call the reKey() method with the new key and set the aes256 parameter to true, e.g., reKey(newKey, aes256=true). After this, you should use the new key for all future loads of this instance.
  • Fix: Resolved a crash that occurred when loading an empty file in ReadOnly mode.
  • Fix: Added protection against the weakly_canonical() exception caused by an invalid file path.
  • Fix: Fixed an issue where the file size could change during multi-process loading.
  • Fix: Corrected a bug where a single key could be overridden incorrectly when upgrading from a v1.1.x version.

iOS/macOS/watchOS

  • Change: Dropped support for the armv7k architecture on Apple Watch. To adapt, you should add armv7k to the "Excluded Architectures" setting for your Apple Watch App or Extension target.
  • Important: Do not upgrade to this version if you need to maintain armv7k support.
  • Change: Dropped deprecated methods that use the relativePath: parameter. If you were using these methods, please migrate to those using the rootPath: parameter instead.

POSIX

  • Change: Dropped support for armv7 architecture.
  • Important: Do not upgrade to this version if you need to maintain armv7 support.

v2.2.4

25 Sep 13:06
cf95303

Choose a tag to compare

v2.2.4 / 2025-09-25

This is a hotfix release mainly for iOS/macOS CocoaPods users.

Changes for All platforms

  • Improve the performance of MMBuffer a little bit in some cases.

iOS/macOS

  • Make MMKV and MMKVCore podspec define modules.

v2.2.3

20 Aug 12:30
f4657ae

Choose a tag to compare

v2.2.3 / 2025-08-20

This is a feature release that brings full desktop support to Flutter. It also includes key bug fixes and enhancements for Android and other platforms.

Flutter

  • Added Full Desktop Support: MMKV for Flutter now officially supports Windows, macOS, and Linux.
  • Example App: The example application has been updated to run on all new desktop platforms.

Android

  • Feature: Added MMKVHandler.getNativeLogHandler() to allow native handling of MMKV logs from C++ code, improving performance.
  • Fix: Corrected an integer overflow bug where a native memory address exceeding Long.MAX_VALUE was misinterpreted as a negative number.
  • Fix: Prevented potential memory overflow by ensuring JNI local references are deleted after use.
  • Fix: Fixed an issue where directories for special relative paths were not being created correctly.
  • Enhancement: Improved the thread-safety of the callback handler to prevent crashes.

iOS/macOS

  • Fix: Resolved a build error on Apple platforms that occurred when the MMKV_APPLE flag was not set.
  • Fix: Addressed a naming conflict in the Swift implementation.

Windows

  • Fix: Corrected character encoding issues in the Win32 demo by converting files to UTF-8.

v1.3.14 LTS

14 May 03:59

Choose a tag to compare

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

08 May 04:57
c74d8b8

Choose a tag to compare

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

25 Apr 10:00
bd7a9f7

Choose a tag to compare

v2.2.1 / 2025-04-25

Changes for All platforms

  • Add importFrom().

Android

  • Fix a bug on initialization.

v2.2.0

24 Apr 11:56
759f81c

Choose a tag to compare

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

18 Feb 11:58
5345e43

Choose a tag to compare

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 of F_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 of F_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 of F_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 LTS

13 Jan 02:49

Choose a tag to compare

v1.3.13 / 2025-01-13

This is a hotfix release for iOS/macOS users. So it is only available on CocoaPods.

iOS/macOS

  • Fix a compile error on the Debug build.