PackageTrack
Sign in Get early access

mmkv_platform_interface

A common platform interface for the MMKV plugin.

2.4.0 18K downloads/mo #2315 most downloaded on pub.dev Tencent/MMKV

What this package is like to depend on

Last release 5 months ago

19 Mar 2026

Ships on a steady schedule

a new release about every 3 months

Some releases are documented

notes for 4 of 12 stable releases

Nothing withdrawn

no release was ever pulled

2 years old

12 releases · first in 2024

2 releases in the last 12 months

see the full history below

Release timeline

12 releases · Apr 2024 to Mar 2026
2025 2026
Release Pre-release

Releases

latest 12
  1. 2.4.0 19 Mar 2026
    Release notes

    v2.4.0 / 2026-03-18 (Breaking Change)

    This release introduces a unified MMKVHandler callback interface across all platforms, replacing scattered per-callback registration with a single, OO-style handler. It also adds the MMKVConfig all-in-one configuration and several bug fixes.

    Changes for All Platforms

    • Feature: Refactored the callback system into a unified MMKVHandler interface. All callbacks (log redirecting, error handling, content change notification, content loaded notification) are now grouped in a single handler registered via registerHandler(). The old per-callback registerLogHandler() / registerErrorHandler() / registerContentChangeHandler() / registerContentLoadedHandler() APIs have been removed.
    • Feature: Added onMMKVContentLoadSuccessfully callback, triggered when an MMKV file is loaded/mapped successfully.
    • Feature: Added MMKVConfig for all-in-one instance configuration, supporting all options (mode, cryptKey, aes256, expectedCapacity, enableKeyExpire, expiredInSeconds, enableCompareBeforeSet, recover, itemSizeLimit) in a single struct/class.
    • Feature: Added defaultMMKV(config) variant for creating the default instance with full configuration.
    • Fix: Robust check on encryption mode (#1642).
    • Fix: Protect from delete file failure on corrupted files.
    • Fix: Protect from m_file not valid for isDiskOfMMAPFileCorrupted().
    • Fix: Reduce absolutePath() calls as much as possible.
    • Drop old-style actual size downgrade support.
    • MMKV must be compiled with C++17.

    Android

    • Change: Merged MMKVContentChangeNotification into MMKVHandler. The old MMKVContentChangeNotification interface is now @Deprecated.
    • Fix: Fix fcntl() OFD lock failure on ashmem (#1637).
    • Merge ashmem size with expectedCapacity.
    • Correctly collect so-symbols.

    iOS/macOS

    • Feature: Added getBytes() with string_view key for ObjC++.
    • Fix: Fixed a memory leak on getting NameSpace instance.
    • Support Swift Package Manager (#535).
    • Fix compile error on tryAtomicRename().

    HarmonyOS NEXT

    • Merge ashmem size with expectedCapacity.

    Flutter

    • Updated to use the unified MMKVHandler callback interface.

    Win32

    • Fix: Convert log message to UTF-8 for Win32 client.
    • Verify all pages for corrupted file detection.
    Open source →
    Release notes

    v2.4.0

    Compare

    Choose a tag to compare

    Open source →
  2. 2.3.0 02 Dec 2025
    Release notes

    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.
    Open source →
    Release notes

    v2.3.0

    Compare

    Choose a tag to compare

    Open source →
  3. 2.2.3 20 Aug 2025
    Release notes

    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.
    Open source →
    Release notes

    v2.2.3

    Compare

    Choose a tag to compare

    Open source →
  4. 2.2.2 20 Aug 2025
    Release notes

    v2.2.2

    Compare

    Choose a tag to compare

    Open source →
  5. 2.2.1 25 Apr 2025

    Nothing published for this version

  6. 2.2.0 24 Apr 2025

    Nothing published for this version

  7. 2.1.0 18 Feb 2025

    Nothing published for this version

  8. 2.0.0 25 Oct 2024

    Nothing published for this version

  9. 1.0.3 25 Oct 2024

    Nothing published for this version

  10. 1.0.2 21 Oct 2024

    Nothing published for this version

  11. 1.0.1 12 Jul 2024

    Nothing published for this version

  12. 1.0.0 19 Apr 2024

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive