update changelog for v2.4.0

This commit is contained in:
guoling
2026-03-18 16:14:05 +08:00
parent f3ddc30bdc
commit a2f49120ae
9 changed files with 72 additions and 0 deletions
+38
View File
@@ -1,4 +1,42 @@
# MMKV Change Log
## v2.4.0 / 2026-03-18
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](https://github.com/nicksunday/mmkv/issues/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](https://github.com/nicksunday/mmkv/issues/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](https://github.com/nicksunday/mmkv/issues/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.
## v2.3.0 / 2025-12-03 (Breaking Change)
This release is a **breaking change** and introduces **AES-256 encryption** for enhanced security.
+7
View File
@@ -1,4 +1,11 @@
# MMKV for HarmonyOS NEXT Change Log
## v2.4.0 / 2026-03-18
* **Feature:** Refactored the callback system into a unified `MMKVHandler` interface. Added `onMMKVContentLoadSuccessfully` callback.
* **Feature:** Added `MMKVConfig` for all-in-one instance configuration.
* **Feature:** Added `defaultMMKVWithConfig()` for creating the default instance with full configuration.
* **Fix:** Robust check on encryption mode.
* Merge ashmem size with `expectedCapacity`.
## v2.3.0 / 2025-12-03
This release introduces **AES-256 encryption** for enhanced security.
+8
View File
@@ -1,4 +1,12 @@
# MMKV for Flutter Change Log
## v2.4.0 / 2026-03-18
* **Feature:** Refactored the callback system into a unified `MMKVHandler` interface. Added `onMMKVContentLoadSuccessfully` callback.
* **Feature:** Added `MMKVConfig` for all-in-one instance configuration.
* **Feature:** Added `defaultMMKV(config)` for creating the default instance with full configuration.
* **Fix:** Robust check on encryption mode.
* Android: Fix `fcntl()` OFD lock failure on ashmem.
* iOS: Fixed a memory leak on getting `NameSpace` instance.
## v2.3.0 / 2025-12-03
This release is a **breaking change** and introduces **AES-256 encryption** for enhanced security.
* **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.
+3
View File
@@ -1,4 +1,7 @@
# MMKV Platform Android Change Log
## v2.4.0 / 2026-03-18
Keep up with native lib v2.4.0.
## v2.3.0 / 2025-12-03
Keep up with native lib v2.3.0.
+3
View File
@@ -1,4 +1,7 @@
# MMKV Platform iOS Change Log
## v2.4.0 / 2026-03-18
Keep up with native lib v2.4.0.
## v2.3.0 / 2025-12-03
Keep up with native lib v2.3.0.
+3
View File
@@ -1,4 +1,7 @@
# MMKV Platform Linux Change Log
## v2.4.0 / 2026-03-18
Keep up with native lib v2.4.0.
## v2.3.0 / 2025-12-03
Keep up with native lib v2.3.0.
+3
View File
@@ -1,4 +1,7 @@
# MMKV Platform OHOS Change Log
## v2.4.0 / 2026-03-18
Keep up with native lib v2.4.0.
## v2.3.0 / 2025-12-03
Keep up with native lib v2.3.0.
@@ -1,4 +1,8 @@
# MMKV Platform Interface Change Log
## v2.4.0 / 2026-03-18
* Add `onMMKVContentLoadSuccessfully` to `MMKVHandler`.
* Add `MMKVConfig` and `defaultMMKV(config)` support.
## v2.3.0 / 2025-12-03
* Alter `getMMKVWithID2()`, `getDefaultMMKV()`, `reKey()` and `checkReSetCryptKey()` to support **AES-256 encryption** functionality.
+3
View File
@@ -1,4 +1,7 @@
# MMKV Platform Windows Change Log
## v2.4.0 / 2026-03-18
Keep up with native lib v2.4.0.
## v2.3.0 / 2025-12-03
Keep up with native lib v2.3.0.