diff --git a/Android/MMKV/gradle.properties b/Android/MMKV/gradle.properties index 136fa883..e28bf484 100644 --- a/Android/MMKV/gradle.properties +++ b/Android/MMKV/gradle.properties @@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx1536m # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME_PREFIX=2.4.2 +VERSION_NAME_PREFIX=2.4.3 #VERSION_NAME_SUFFIX=-SNAPSHOT VERSION_NAME_SUFFIX= diff --git a/CHANGELOG.md b/CHANGELOG.md index 332caebf..8d7b87b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,34 @@ # MMKV Change Log +## v2.4.3 / 2026-10-16 + +This is a bugfix release based on v2.4.2, focused on encryption, expiration, imports, and file recovery. It also adds Android KMP initialization without an explicit Context and non-expired-key enumeration on Apple platforms. + +### Changes for All Platforms +* **Fix:** Prevented IV reuse when repeatedly updating an encrypted store containing a single key. +* **Fix:** Loaded expiration state before the first read or write after reopening a store, and honored expiration in read-only reads, key lists, and counts. +* **Fix:** Fixed lock-order deadlocks in `importFrom()` ([#1688](https://github.com/tencent/mmkv/issues/1688)) and `removeStorage()`. Callers must still prevent concurrent use of an instance being removed. +* **Fix:** Preserved source values when importing into encrypted stores, rejected self-import, and counted only successful imports. +* **Fix:** Corrected unsigned protobuf value-length decoding and hardened key/value length checks, payload growth, expiration migration, and encryption removal against oversized or unrepresentable data. +* **Fix:** Corrected file-size validation, undersized-file handling, read-only recovery, and cached restore mapping checks; required complete whole-file reads and zero-fill writes. +* **Fix:** Corrected small-buffer moves and resets to avoid truncation errors and unaligned access. + +### Kotlin Multiplatform +* **Fix:** Restored Android string-write interoperability with the native Java API. +* **Feature:** Added Android `MMKV.initialize()` without an explicit Context using AndroidX App Startup. Explicit Context initialization remains available. + +### iOS/macOS +* **Fix:** Made `enumerateKeys:` safe when callbacks read expired values. +* **Feature:** Added `enumerateNonExpiredKeys:` to filter expired keys at the start of enumeration. + +### HarmonyOS NEXT +* **Fix:** Validated ArrayBuffer slice ranges, backing-buffer bounds, and typed-array alignment before accessing memory. + +### Flutter +* **Fix:** Prevented an Android plugin detach crash when `libmmkv.so` is unavailable for the device ABI ([#1687](https://github.com/tencent/mmkv/pull/1687)). + +### POSIX/Linux +* **Fix:** Completed short and interrupted file-copy operations, including Linux `sendfile()` transfers. + ## v2.4.2 / 2026-08-21 This is a hotfix release based on v2.4.1. It adds targeted encrypted-write and backup/restore checks, fixes Kotlin Multiplatform consistency issues, and repairs native package build/link regressions. diff --git a/Core/MMKVPredef.h b/Core/MMKVPredef.h index 508d46b0..df570275 100755 --- a/Core/MMKVPredef.h +++ b/Core/MMKVPredef.h @@ -34,7 +34,7 @@ #include #include -constexpr auto MMKV_VERSION = "v2.4.2"; +constexpr auto MMKV_VERSION = "v2.4.3"; #ifdef DEBUG # define MMKV_DEBUG diff --git a/KMP/PUBLISHING.md b/KMP/PUBLISHING.md index 1aea2a7a..6044925d 100644 --- a/KMP/PUBLISHING.md +++ b/KMP/PUBLISHING.md @@ -8,18 +8,18 @@ same build. Confirm that these versions match: ```text -Core/MMKVPredef.h v2.4.2 -Android/MMKV/gradle.properties 2.4.2 -KMP/gradle.properties 2.4.2 -MMKV*.podspec 2.4.2 +Core/MMKVPredef.h v2.4.3 +Android/MMKV/gradle.properties 2.4.3 +KMP/gradle.properties 2.4.3 +MMKV*.podspec 2.4.3 ``` -The release tag `v2.4.2` must exist before publishing because the standalone +The release tag `v2.4.3` must exist before publishing because the standalone KMP native build fallback resolves MMKV Core from that tag. ## 2. Publish the Android dependency locally -The KMP Android target depends on `com.tencent:mmkv:2.4.2`. +The KMP Android target depends on `com.tencent:mmkv:2.4.3`. Use one workspace-local repository for both the Android dependency and the KMP publications. The commands below keep Gradle's project caches under the ignored KMP build directory without changing `GRADLE_USER_HOME`. @@ -61,7 +61,7 @@ KMP/gradlew -p KMP :mmkv:connectedAndroidDeviceTest \ ``` Before release, also install the sample as an external consumer of -`com.tencent:mmkv-kmp:2.4.2` on physical Android and iOS devices. Opting into +`com.tencent:mmkv-kmp:2.4.3` on physical Android and iOS devices. Opting into the sample with `MMKV_USE_PUBLISHED=true` disables its unpublished desktop target and replaces `project(":mmkv")` with the root KMP coordinate: @@ -220,7 +220,7 @@ After Maven Central synchronization, test a clean project without ```kotlin commonMain.dependencies { - implementation("com.tencent:mmkv-kmp:2.4.2") + implementation("com.tencent:mmkv-kmp:2.4.3") } ``` diff --git a/KMP/README.md b/KMP/README.md index daae996b..b6517f76 100644 --- a/KMP/README.md +++ b/KMP/README.md @@ -11,7 +11,7 @@ Add the MMKV KMP package to your shared module: kotlin { sourceSets { commonMain.dependencies { - implementation("com.tencent:mmkv-kmp:2.4.2") + implementation("com.tencent:mmkv-kmp:2.4.3") } } } @@ -23,7 +23,7 @@ Android consumers should have AndroidX enabled in `gradle.properties`: android.useAndroidX=true ``` -Supported targets in v2.4.2: +Supported targets in v2.4.3: * Android * `iosArm64` @@ -38,16 +38,16 @@ iOS 14. For this experimental release, consumers should depend only on the root artifact: ```text -com.tencent:mmkv-kmp:2.4.2 +com.tencent:mmkv-kmp:2.4.3 ``` Gradle uses Kotlin Multiplatform metadata to select the target artifact: ```text -com.tencent:mmkv-kmp-android:2.4.2 -com.tencent:mmkv-kmp-iosarm64:2.4.2 -com.tencent:mmkv-kmp-iossimulatorarm64:2.4.2 -com.tencent:mmkv-kmp-iosx64:2.4.2 +com.tencent:mmkv-kmp-android:2.4.3 +com.tencent:mmkv-kmp-iosarm64:2.4.3 +com.tencent:mmkv-kmp-iossimulatorarm64:2.4.3 +com.tencent:mmkv-kmp-iosx64:2.4.3 ``` Do not add the target-specific artifacts directly. @@ -139,7 +139,7 @@ by the same native instance become invalid immediately. The caller must ensure that no operation is running and no reference is used afterward. Discard every reference before reopening the same ID. -Android delegates to the native `com.tencent:mmkv:2.4.2` AAR. iOS embeds MMKV +Android delegates to the native `com.tencent:mmkv:2.4.3` AAR. iOS embeds MMKV Core through the C bridge in the published native KLIBs, so consumers do not need CocoaPods, Swift Package Manager, or a source build. @@ -158,7 +158,7 @@ cd KMP ``` `MMKV_USE_MAVEN_LOCAL=true` is needed when the matching -`com.tencent:mmkv:2.4.2` Android artifact has been published only to Maven +`com.tencent:mmkv:2.4.3` Android artifact has been published only to Maven Local. Release maintainers should also follow [PUBLISHING.md](./PUBLISHING.md). diff --git a/KMP/gradle.properties b/KMP/gradle.properties index 34b9cfe3..93eb9372 100644 --- a/KMP/gradle.properties +++ b/KMP/gradle.properties @@ -12,14 +12,14 @@ kotlin.native.cacheKind.iosArm64=none kotlin.native.cacheKind.iosSimulatorArm64=none # Published KMP wrapper coordinates -MMKV_VERSION=2.4.2 -VERSION_NAME=2.4.2 +MMKV_VERSION=2.4.3 +VERSION_NAME=2.4.3 GROUP=com.tencent POM_ARTIFACT_ID=mmkv-kmp # Native iOS cbridge fetch overrides used when building outside this monorepo. # MMKV_GIT_REPOSITORY=https://github.com/Tencent/MMKV.git -# MMKV_GIT_TAG=v2.4.2 +# MMKV_GIT_TAG=v2.4.3 # MMKV_GIT_BRANCH= # MMKV_GIT_COMMIT= diff --git a/KMP/mmkv/build.gradle.kts b/KMP/mmkv/build.gradle.kts index 87e775f7..78a99b5f 100644 --- a/KMP/mmkv/build.gradle.kts +++ b/KMP/mmkv/build.gradle.kts @@ -29,7 +29,7 @@ plugins { id("signing") } -val mmkvVersion = (findProperty("MMKV_VERSION") as? String) ?: "2.4.2" +val mmkvVersion = (findProperty("MMKV_VERSION") as? String) ?: "2.4.3" val publishVersion = (findProperty("VERSION_NAME") as? String) ?: mmkvVersion val baseArtifactId = (findProperty("POM_ARTIFACT_ID") as? String) ?: "mmkv-kmp" val publishedGroup = (findProperty("GROUP") as? String) ?: "com.tencent" diff --git a/KMP/mmkv/nativeInterop/CMakeLists.txt b/KMP/mmkv/nativeInterop/CMakeLists.txt index 86c30efc..0a9920a0 100644 --- a/KMP/mmkv/nativeInterop/CMakeLists.txt +++ b/KMP/mmkv/nativeInterop/CMakeLists.txt @@ -23,7 +23,7 @@ project(mmkv-kmp) # Set the version of MMKV to use. Can be overridden by Gradle via # -DMMKV_VERSION=v. Defaults to the in-repo value when run standalone. -set(MMKV_VERSION "v2.4.2" CACHE STRING "MMKV version to fetch when built outside the monorepo") +set(MMKV_VERSION "v2.4.3" CACHE STRING "MMKV version to fetch when built outside the monorepo") set(MMKV_GIT_REPOSITORY "https://github.com/Tencent/MMKV.git" CACHE STRING "MMKV git repository to fetch when built outside the monorepo") set(MMKV_GIT_TAG "${MMKV_VERSION}" CACHE STRING "MMKV git tag, branch, or commit to fetch when built outside the monorepo") diff --git a/KMP/mmkv/src/commonTest/kotlin/com/tencent/mmkv/kmp/MMKVSmokeTest.kt b/KMP/mmkv/src/commonTest/kotlin/com/tencent/mmkv/kmp/MMKVSmokeTest.kt index c8a3df64..6dbf116d 100644 --- a/KMP/mmkv/src/commonTest/kotlin/com/tencent/mmkv/kmp/MMKVSmokeTest.kt +++ b/KMP/mmkv/src/commonTest/kotlin/com/tencent/mmkv/kmp/MMKVSmokeTest.kt @@ -40,7 +40,7 @@ class MMKVSmokeTest { @Test fun releaseVersionMatchesPublishedVersion() { MMKVTestEnv.initialize() - assertEquals("v2.4.2", MMKV.version()) + assertEquals("v2.4.3", MMKV.version()) } @Test diff --git a/KMP/sample/composeApp/build.gradle.kts b/KMP/sample/composeApp/build.gradle.kts index 375da662..7d1bdb34 100644 --- a/KMP/sample/composeApp/build.gradle.kts +++ b/KMP/sample/composeApp/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } val usePublishedMMKV = providers.gradleProperty("MMKV_USE_PUBLISHED").orNull == "true" -val mmkvVersion = providers.gradleProperty("VERSION_NAME").getOrElse("2.4.2") +val mmkvVersion = providers.gradleProperty("VERSION_NAME").getOrElse("2.4.3") kotlin { androidTarget { diff --git a/KMP/sample/composeApp/src/commonMain/kotlin/com/tencent/mmkv/sample/MMKVConsumerSmoke.kt b/KMP/sample/composeApp/src/commonMain/kotlin/com/tencent/mmkv/sample/MMKVConsumerSmoke.kt index 1cd68105..d5a8141d 100644 --- a/KMP/sample/composeApp/src/commonMain/kotlin/com/tencent/mmkv/sample/MMKVConsumerSmoke.kt +++ b/KMP/sample/composeApp/src/commonMain/kotlin/com/tencent/mmkv/sample/MMKVConsumerSmoke.kt @@ -5,7 +5,7 @@ import com.tencent.mmkv.kmp.MMKVNameSpace import kotlin.random.Random fun verifyMMKVConsumer() { - check(MMKV.version() == "v2.4.2") + check(MMKV.version() == "v2.4.3") val id = "published-consumer-${Random.nextLong()}" val kv = MMKV.mmkvWithID(id) diff --git a/MMKV.podspec b/MMKV.podspec index 57e78911..ad7e90b5 100644 --- a/MMKV.podspec +++ b/MMKV.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MMKV" - s.version = "2.4.2" + s.version = "2.4.3" s.summary = "MMKV is a cross-platform key-value storage framework developed by WeChat." s.description = <<-DESC @@ -37,7 +37,7 @@ Pod::Spec.new do |s| "DEFINES_MODULE" => "YES", } - s.dependency 'MMKVCore', '~> 2.4.2' + s.dependency 'MMKVCore', '~> 2.4.3' end diff --git a/MMKVAppExtension.podspec b/MMKVAppExtension.podspec index a7889e2e..0acdf3bb 100644 --- a/MMKVAppExtension.podspec +++ b/MMKVAppExtension.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MMKVAppExtension" - s.version = "2.4.2" + s.version = "2.4.3" s.summary = "MMKV is a cross-platform key-value storage framework developed by WeChat." s.module_name = "MMKVAppExtension" @@ -34,7 +34,7 @@ Pod::Spec.new do |s| "GCC_PREPROCESSOR_DEFINITIONS" => "MMKV_IOS_EXTENSION", } - s.dependency 'MMKVCore', '~> 2.4.2' + s.dependency 'MMKVCore', '~> 2.4.3' end diff --git a/MMKVCore.podspec b/MMKVCore.podspec index c9be152b..dd75117f 100644 --- a/MMKVCore.podspec +++ b/MMKVCore.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MMKVCore" - s.version = "2.4.2" + s.version = "2.4.3" s.summary = "MMKVCore for MMKV. MMKV is a cross-platform key-value storage framework developed by WeChat." s.description = <<-DESC diff --git a/MMKVWatchExtension.podspec b/MMKVWatchExtension.podspec index d6c84162..d5dd3a73 100644 --- a/MMKVWatchExtension.podspec +++ b/MMKVWatchExtension.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MMKVWatchExtension" - s.version = "2.4.2" + s.version = "2.4.3" s.summary = "MMKV is a cross-platform key-value storage framework developed by WeChat." s.module_name = "MMKVWatchExtension" @@ -35,7 +35,7 @@ Pod::Spec.new do |s| 'EXCLUDED_ARCHS[sdk=watchos*]' => 'armv7k', } - s.dependency 'MMKVCore', '~> 2.4.2' + s.dependency 'MMKVCore', '~> 2.4.3' end diff --git a/OpenHarmony/MMKV/BuildProfile.ets b/OpenHarmony/MMKV/BuildProfile.ets index 429c6974..b7206683 100644 --- a/OpenHarmony/MMKV/BuildProfile.ets +++ b/OpenHarmony/MMKV/BuildProfile.ets @@ -1,7 +1,7 @@ /** * Use these variables when you tailor your ArkTS code. They must be of the const type. */ -export const HAR_VERSION = '2.4.2'; +export const HAR_VERSION = '2.4.3'; export const BUILD_MODE_NAME = 'release'; export const DEBUG = false; export const TARGET_NAME = 'default'; diff --git a/OpenHarmony/MMKV/CHANGELOG.md b/OpenHarmony/MMKV/CHANGELOG.md index c52aaac7..a43e784a 100644 --- a/OpenHarmony/MMKV/CHANGELOG.md +++ b/OpenHarmony/MMKV/CHANGELOG.md @@ -1,4 +1,8 @@ # MMKV for HarmonyOS NEXT Change Log +## v2.4.3 / 2026-10-16 +* Keep up with MMKV Core v2.4.3 encryption, expiration, import, and file-recovery fixes. +* Validate ArrayBuffer slice ranges, backing-buffer bounds, and typed-array alignment before accessing memory. + ## v2.4.2 / 2026-08-21 * Keep up with MMKV Core v2.4.2 hotfix and data-safety fixes. * **Fix:** Corrected the one-year expiration constant. diff --git a/OpenHarmony/MMKV/README.md b/OpenHarmony/MMKV/README.md index 871c7e89..e4af96b9 100644 --- a/OpenHarmony/MMKV/README.md +++ b/OpenHarmony/MMKV/README.md @@ -1,6 +1,6 @@ [![license](https://img.shields.io/badge/license-BSD_3-brightgreen.svg?style=flat)](https://github.com/Tencent/MMKV/blob/master/LICENSE.TXT) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/MMKV/pulls) -[![Release Version](https://img.shields.io/badge/release-2.4.2-brightgreen.svg)](https://github.com/Tencent/MMKV/releases) +[![Release Version](https://img.shields.io/badge/release-2.4.3-brightgreen.svg)](https://github.com/Tencent/MMKV/releases) [![Platform](https://img.shields.io/badge/Platform-%20HarmonyOS%20NEXT-brightgreen.svg)](https://github.com/Tencent/MMKV/wiki/home) MMKV is an **efficient**, **small**, **easy-to-use** mobile key-value storage framework used in the WeChat application. It's now available on **HarmonyOS NEXT**. @@ -37,7 +37,7 @@ Or, you can add it to your project manually. ```json "dependencies": { - "@tencent/mmkv": "~2.4.2", + "@tencent/mmkv": "~2.4.3", } ``` * Then run diff --git a/OpenHarmony/MMKV/oh-package.json5 b/OpenHarmony/MMKV/oh-package.json5 index a22eaa92..577572f0 100644 --- a/OpenHarmony/MMKV/oh-package.json5 +++ b/OpenHarmony/MMKV/oh-package.json5 @@ -1,6 +1,6 @@ { "name": "@tencent/mmkv", - "version": "2.4.2", + "version": "2.4.3", "description": "The official OpenHarmony package of MMKV. An efficient, small mobile key-value storage framework developed by WeChat.", "main": "Index.ets", "author": { diff --git a/OpenHarmony/entry/oh-package.json5 b/OpenHarmony/entry/oh-package.json5 index f09b808a..d915a17f 100644 --- a/OpenHarmony/entry/oh-package.json5 +++ b/OpenHarmony/entry/oh-package.json5 @@ -7,7 +7,7 @@ "license": "BSD 3-Clause", "dependencies": { "@tencent/mmkv": "file:../MMKV", -// "@tencent/mmkv": "~2.4.2", +// "@tencent/mmkv": "~2.4.3", "libentry.so": "file:./src/main/cpp/types/libentry", } } \ No newline at end of file diff --git a/README.md b/README.md index ae069a79..e0ba1f82 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![license](https://img.shields.io/badge/license-BSD_3-brightgreen.svg?style=flat)](https://github.com/Tencent/MMKV/blob/master/LICENSE.TXT) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/MMKV/pulls) -[![Release Version](https://img.shields.io/badge/release-2.4.2-brightgreen.svg)](https://github.com/Tencent/MMKV/releases) +[![Release Version](https://img.shields.io/badge/release-2.4.3-brightgreen.svg)](https://github.com/Tencent/MMKV/releases) [![Platform](https://img.shields.io/badge/Platform-%20Android%20%7C%20iOS%2FmacOS%20%7C%20Kotlin%20Multiplatform%20%7C%20Windows%20%7C%20POSIX%20%7C%20HarmonyOS%20NEXT-brightgreen.svg)](https://github.com/Tencent/MMKV/wiki/home) 中文版本请参看[这里](./README_CN.md) @@ -9,7 +9,7 @@ MMKV is an **efficient**, **small**, **easy-to-use** mobile key-value storage fr # MMKV for Kotlin Multiplatform -The v2.4.2 Kotlin Multiplatform package is experimental and currently targets +The v2.4.3 Kotlin Multiplatform package is experimental and currently targets Android and iOS. Its API and artifact layout may change in a future release. Add it to the shared module: @@ -17,7 +17,7 @@ Add it to the shared module: kotlin { sourceSets { commonMain.dependencies { - implementation("com.tencent:mmkv-kmp:2.4.2") + implementation("com.tencent:mmkv-kmp:2.4.3") } } } @@ -46,8 +46,8 @@ Add the following lines to `build.gradle` on your app module: ```gradle dependencies { - implementation 'com.tencent:mmkv:2.4.2' - // replace "2.4.2" with any available version + implementation 'com.tencent:mmkv:2.4.3' + // replace "2.4.3" with any available version } ``` diff --git a/README_CN.md b/README_CN.md index 0115bc31..6c68f0e3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -3,14 +3,14 @@ MMKV 是基于 mmap 内存映射的 key-value 组件,底层序列化/反序列 ## Kotlin Multiplatform 指南 -v2.4.2 的 Kotlin Multiplatform 包为实验性功能,目前支持 Android 与 iOS; +v2.4.3 的 Kotlin Multiplatform 包为实验性功能,目前支持 Android 与 iOS; 后续版本可能调整 API 或产物结构。在共享模块中引入: ```kotlin kotlin { sourceSets { commonMain.dependencies { - implementation("com.tencent:mmkv-kmp:2.4.2") + implementation("com.tencent:mmkv-kmp:2.4.3") } } } @@ -39,8 +39,8 @@ kotlin { ```gradle dependencies { - implementation 'com.tencent:mmkv:2.4.2' - // replace "2.4.2" with any available version + implementation 'com.tencent:mmkv:2.4.3' + // replace "2.4.3" with any available version } ``` 从 v2.0.0 起, MMKV **去掉了 32-bit 架构的支持**、API level 22 及以下的支持, 如有这类需求,请使用 v1.3.x LTS 版本。 diff --git a/flutter/mmkv/CHANGELOG.md b/flutter/mmkv/CHANGELOG.md index 709da71f..dbcb7c93 100644 --- a/flutter/mmkv/CHANGELOG.md +++ b/flutter/mmkv/CHANGELOG.md @@ -1,4 +1,9 @@ # MMKV for Flutter Change Log +## v2.4.3 / 2026-10-16 +* Keep up with MMKV native libraries v2.4.3, including encryption, expiration, import, and file-recovery fixes. +* Android: Prevent a plugin detach crash when the native library is unavailable for the device ABI ([#1687](https://github.com/tencent/mmkv/pull/1687)). +* HarmonyOS NEXT: Validate ArrayBuffer slice bounds and typed-array alignment. + ## v2.4.2 / 2026-08-21 * Keep up with MMKV native libraries v2.4.2 and their hotfix/data-safety fixes. * **Fix:** Corrected the one-year expiration constant. diff --git a/flutter/mmkv/README.md b/flutter/mmkv/README.md index 0537f8bc..3884431f 100644 --- a/flutter/mmkv/README.md +++ b/flutter/mmkv/README.md @@ -1,6 +1,6 @@ [![license](https://img.shields.io/badge/license-BSD_3-brightgreen.svg?style=flat)](https://github.com/Tencent/MMKV/blob/master/LICENSE.TXT) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/MMKV/pulls) -[![Release Version](https://img.shields.io/badge/release-2.4.2-brightgreen.svg)](https://github.com/Tencent/MMKV/releases) +[![Release Version](https://img.shields.io/badge/release-2.4.3-brightgreen.svg)](https://github.com/Tencent/MMKV/releases) [![Platform](https://img.shields.io/badge/Platform-%20Android%20%7C%20iOS-brightgreen.svg)](https://github.com/Tencent/MMKV/wiki/home) MMKV is an **efficient**, **small**, **easy-to-use** mobile key-value storage framework used in the WeChat application. It's currently available on **Android** and **iOS**. @@ -26,7 +26,7 @@ Add the following lines to `pubspec.yaml` on your app module. Then run `flutter ```yaml dependencies: - mmkv: "^2.4.2" + mmkv: "^2.4.3" ``` If you already include MMKV native lib in your App, you need to upgrade to version newer than v2.0.0. diff --git a/flutter/mmkv/example/android/app/build.gradle b/flutter/mmkv/example/android/app/build.gradle index 7ad0657c..34999cbe 100644 --- a/flutter/mmkv/example/android/app/build.gradle +++ b/flutter/mmkv/example/android/app/build.gradle @@ -52,7 +52,7 @@ android { } dependencies { - implementation('com.tencent:mmkv:2.4.2') + implementation('com.tencent:mmkv:2.4.3') constraints { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { diff --git a/flutter/mmkv/pubspec.yaml b/flutter/mmkv/pubspec.yaml index 7114f784..956864a1 100644 --- a/flutter/mmkv/pubspec.yaml +++ b/flutter/mmkv/pubspec.yaml @@ -1,6 +1,6 @@ name: mmkv description: An efficient, small mobile key-value storage framework developed by WeChat. Works on Android & iOS. -version: 2.4.2 +version: 2.4.3 homepage: https://github.com/Tencent/mmkv repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv @@ -13,19 +13,19 @@ dependencies: sdk: flutter ffi: ^2.0.0 mmkv_ios: - '>=2.4.2 <2.5.0' + '>=2.4.3 <2.5.0' # path: ../mmkv_ios mmkv_android: - '>=2.4.2 <2.5.0' + '>=2.4.3 <2.5.0' # path: ../mmkv_android mmkv_ohos: - '>=2.4.2 <2.5.0' + '>=2.4.3 <2.5.0' # path: ../mmkv_ohos mmkv_win32: - '>=2.4.2 <2.5.0' + '>=2.4.3 <2.5.0' # path: ../mmkv_win32 mmkv_linux: - '>=2.4.2 <2.5.0' + '>=2.4.3 <2.5.0' # path: ../mmkv_linux mmkv_platform_interface: '>=2.4.0 <2.5.0' diff --git a/flutter/mmkv_android/CHANGELOG.md b/flutter/mmkv_android/CHANGELOG.md index 26c80c45..0d12679f 100644 --- a/flutter/mmkv_android/CHANGELOG.md +++ b/flutter/mmkv_android/CHANGELOG.md @@ -1,4 +1,8 @@ # MMKV Platform Android Change Log +## v2.4.3 / 2026-10-16 +* Keep up with native lib v2.4.3. +* Prevent a plugin detach crash when `libmmkv.so` is unavailable for the device ABI ([#1687](https://github.com/tencent/mmkv/pull/1687)). + ## v2.4.2 / 2026-08-21 Keep up with native lib v2.4.2. diff --git a/flutter/mmkv_android/android/build.gradle b/flutter/mmkv_android/android/build.gradle index 3533faeb..c613b2b3 100644 --- a/flutter/mmkv_android/android/build.gradle +++ b/flutter/mmkv_android/android/build.gradle @@ -34,6 +34,6 @@ android { } dependencies { - implementation 'com.tencent:mmkv:[2.4.2, 2.5)' + implementation 'com.tencent:mmkv:[2.4.3, 2.5)' } } diff --git a/flutter/mmkv_android/pubspec.yaml b/flutter/mmkv_android/pubspec.yaml index 3cc0be1b..2934496a 100644 --- a/flutter/mmkv_android/pubspec.yaml +++ b/flutter/mmkv_android/pubspec.yaml @@ -1,7 +1,7 @@ name: mmkv_android description: Android platform implementation of MMKV. repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv_android -version: 2.4.2 +version: 2.4.3 homepage: https://github.com/Tencent/mmkv environment: diff --git a/flutter/mmkv_ios/CHANGELOG.md b/flutter/mmkv_ios/CHANGELOG.md index 9085b680..1a6639f1 100644 --- a/flutter/mmkv_ios/CHANGELOG.md +++ b/flutter/mmkv_ios/CHANGELOG.md @@ -1,4 +1,7 @@ # MMKV Platform iOS Change Log +## v2.4.3 / 2026-10-16 +* Keep up with native lib v2.4.3 encryption, expiration, import, and file-recovery fixes. + ## v2.4.2 / 2026-08-21 * Keep up with native lib v2.4.2. * Fix Swift Package Manager linkage and Dart FFI symbol export ([#1676](https://github.com/tencent/mmkv/issues/1676)). diff --git a/flutter/mmkv_ios/darwin/mmkv_ios.podspec b/flutter/mmkv_ios/darwin/mmkv_ios.podspec index d5bac2d4..731f69af 100644 --- a/flutter/mmkv_ios/darwin/mmkv_ios.podspec +++ b/flutter/mmkv_ios/darwin/mmkv_ios.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |s| s.name = 'mmkv_ios' - s.version = '2.4.2' + s.version = '2.4.3' s.summary = 'MMKV is a cross-platform key-value storage framework developed by WeChat.' s.description = <<-DESC The MMKV, for Flutter. @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.osx.dependency 'FlutterMacOS' s.ios.deployment_target = '13.0' s.osx.deployment_target = '10.15' - s.dependency 'MMKV', '>= 2.4.2', '< 2.5' + s.dependency 'MMKV', '>= 2.4.3', '< 2.5' s.osx.framework = 'FlutterMacOS' # Flutter.framework does not contain a i386 slice. diff --git a/flutter/mmkv_ios/darwin/mmkv_ios/Package.swift b/flutter/mmkv_ios/darwin/mmkv_ios/Package.swift index 545d3df8..c6979818 100644 --- a/flutter/mmkv_ios/darwin/mmkv_ios/Package.swift +++ b/flutter/mmkv_ios/darwin/mmkv_ios/Package.swift @@ -6,7 +6,7 @@ let mmkvDependency: Package.Dependency if let localPath = Context.environment["MMKV_LOCAL_PACKAGE_PATH"], !localPath.isEmpty { mmkvDependency = .package(name: "MMKV", path: localPath) } else { - mmkvDependency = .package(url: "https://github.com/Tencent/MMKV.git", from: "2.4.2") + mmkvDependency = .package(url: "https://github.com/Tencent/MMKV.git", from: "2.4.3") // mmkvDependency = .package(url: "https://github.com/Tencent/MMKV.git", branch: "dev") } diff --git a/flutter/mmkv_ios/pubspec.yaml b/flutter/mmkv_ios/pubspec.yaml index bb704cdb..645f7b16 100644 --- a/flutter/mmkv_ios/pubspec.yaml +++ b/flutter/mmkv_ios/pubspec.yaml @@ -1,7 +1,7 @@ name: mmkv_ios description: iOS platform implementation of MMKV. repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv_ios -version: 2.4.2 +version: 2.4.3 homepage: https://github.com/Tencent/mmkv environment: diff --git a/flutter/mmkv_linux/CHANGELOG.md b/flutter/mmkv_linux/CHANGELOG.md index 9ee6ee36..5f20e050 100644 --- a/flutter/mmkv_linux/CHANGELOG.md +++ b/flutter/mmkv_linux/CHANGELOG.md @@ -1,4 +1,8 @@ # MMKV Platform Linux Change Log +## v2.4.3 / 2026-10-16 +* Keep up with native lib v2.4.3. +* Complete short and interrupted file copies, including Linux `sendfile()` transfers. + ## v2.4.2 / 2026-08-21 Keep up with native lib v2.4.2. diff --git a/flutter/mmkv_linux/linux/CMakeLists.txt b/flutter/mmkv_linux/linux/CMakeLists.txt index 38098616..0baac60a 100644 --- a/flutter/mmkv_linux/linux/CMakeLists.txt +++ b/flutter/mmkv_linux/linux/CMakeLists.txt @@ -9,7 +9,7 @@ project(${PROJECT_NAME} LANGUAGES CXX) # Set the version of MMKV to use. This should match the version used in the # mmkv_flutter plugin. -set(MMKV_VERSION "v2.4.2") +set(MMKV_VERSION "v2.4.3") include(FetchContent) FetchContent_Declare(mmkv diff --git a/flutter/mmkv_linux/pubspec.yaml b/flutter/mmkv_linux/pubspec.yaml index d3281cb0..67211180 100644 --- a/flutter/mmkv_linux/pubspec.yaml +++ b/flutter/mmkv_linux/pubspec.yaml @@ -1,7 +1,7 @@ name: mmkv_linux description: Linux platform implementation of MMKV. repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv_linux -version: 2.4.2 +version: 2.4.3 homepage: https://github.com/Tencent/mmkv environment: diff --git a/flutter/mmkv_ohos/CHANGELOG.md b/flutter/mmkv_ohos/CHANGELOG.md index 6b503df4..8d5cdbbf 100644 --- a/flutter/mmkv_ohos/CHANGELOG.md +++ b/flutter/mmkv_ohos/CHANGELOG.md @@ -1,4 +1,8 @@ # MMKV Platform OHOS Change Log +## v2.4.3 / 2026-10-16 +* Keep up with native lib v2.4.3. +* Validate ArrayBuffer slice bounds and typed-array alignment in the native library. + ## v2.4.2 / 2026-08-21 Keep up with native lib v2.4.2. diff --git a/flutter/mmkv_ohos/ohos/oh-package.json5 b/flutter/mmkv_ohos/ohos/oh-package.json5 index a00368df..7448ac89 100644 --- a/flutter/mmkv_ohos/ohos/oh-package.json5 +++ b/flutter/mmkv_ohos/ohos/oh-package.json5 @@ -1,13 +1,13 @@ { "name": "mmkv_ohos", - "version": "2.4.2", + "version": "2.4.3", "description": "Please describe the basic information.", "main": "index.ets", "author": "", "license": "Apache-2.0", "dependencies": { "@ohos/flutter_ohos": "file:./har/flutter.har", - "@tencent/mmkv": ">=2.4.2 <2.5" + "@tencent/mmkv": ">=2.4.3 <2.5" // "@tencent/mmkv": "file:/Users/lingol/Developer/mmkv/OpenHarmony/MMKV/build/default/outputs/default/MMKV.har" }, "devDependencies": {}, diff --git a/flutter/mmkv_ohos/pubspec.yaml b/flutter/mmkv_ohos/pubspec.yaml index 4e4dec6d..2353a018 100644 --- a/flutter/mmkv_ohos/pubspec.yaml +++ b/flutter/mmkv_ohos/pubspec.yaml @@ -1,7 +1,7 @@ name: mmkv_ohos description: OHOS platform implementation of MMKV. repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv_ohos -version: 2.4.2 +version: 2.4.3 homepage: https://github.com/Tencent/mmkv environment: diff --git a/flutter/mmkv_win32/CHANGELOG.md b/flutter/mmkv_win32/CHANGELOG.md index 853a7def..59756d8b 100644 --- a/flutter/mmkv_win32/CHANGELOG.md +++ b/flutter/mmkv_win32/CHANGELOG.md @@ -1,4 +1,8 @@ # MMKV Platform Windows Change Log +## v2.4.3 / 2026-10-16 +* Keep up with native lib v2.4.3. +* Require complete whole-file reads and zero-fill writes in the native library. + ## v2.4.2 / 2026-08-21 Keep up with native lib v2.4.2. diff --git a/flutter/mmkv_win32/pubspec.yaml b/flutter/mmkv_win32/pubspec.yaml index 394f0ca9..2b4b6706 100644 --- a/flutter/mmkv_win32/pubspec.yaml +++ b/flutter/mmkv_win32/pubspec.yaml @@ -1,7 +1,7 @@ name: mmkv_win32 description: Windows platform implementation of MMKV. repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv_win32 -version: 2.4.2 +version: 2.4.3 homepage: https://github.com/Tencent/mmkv environment: diff --git a/flutter/mmkv_win32/windows/CMakeLists.txt b/flutter/mmkv_win32/windows/CMakeLists.txt index fa83f09f..b41854db 100644 --- a/flutter/mmkv_win32/windows/CMakeLists.txt +++ b/flutter/mmkv_win32/windows/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_policy(VERSION 3.14...3.25) # Set the version of MMKV to use. This should match the version used in the # mmkv_flutter plugin. -set(MMKV_VERSION "v2.4.2") +set(MMKV_VERSION "v2.4.3") include(FetchContent) FetchContent_Declare(mmkv diff --git a/iOS/MMKV/MMKV.xcodeproj/project.pbxproj b/iOS/MMKV/MMKV.xcodeproj/project.pbxproj index 6630b338..df4d092c 100644 --- a/iOS/MMKV/MMKV.xcodeproj/project.pbxproj +++ b/iOS/MMKV/MMKV.xcodeproj/project.pbxproj @@ -622,7 +622,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 2.4.2; + MARKETING_VERSION = 2.4.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; @@ -681,7 +681,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 2.4.2; + MARKETING_VERSION = 2.4.3; MTL_ENABLE_DEBUG_INFO = NO; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; TVOS_DEPLOYMENT_TARGET = 13.0;