About this project

MMKV is a mobile key-value storage framework developed by WeChat and published by Tencent under the BSD 3-Clause license. It is described as efficient, small and easy to use, and is available on Android, iOS/macOS, Windows, POSIX and HarmonyOS NEXT, with experimental Kotlin Multiplatform support targeting Android and iOS. Core design: MMKV uses mmap to keep memory synced with files and protobuf to encode and decode values. Changes are saved immediately, so no sync, apply, save or synchronize calls are required. It supports concurrent read-read and read-write access between processes. The project states a small binary footprint: about 50K per architecture on Android, less than 30K on iOS/macOS, about 10K on Windows, about 7K on POSIX, and about 600K on HarmonyOS NEXT, with smaller sizes when packaged. Platform setup: Android is installed via Maven with the com.tencent:mmkv dependency; from v2.0.0 32-bit architectures and API levels 21-22 are no longer supported, with v1.3.x offered as an LTS series for those. iOS/macOS uses CocoaPods with the MMKV pod. Windows is built from source with Visual Studio project files. POSIX integrates through CMake. HarmonyOS NEXT installs via OHPM as @tencent/mmkv. Kotlin Multiplatform is added as com.tencent:mmkv-kmp in commonMain dependencies. Usage: after initializing MMKV with a root directory at app startup, a global default instance is available. The API provides typed encode/set and decode/get methods for bool, int32, int64, string and bytes values across the supported platforms. Multi-process access is supported and documented in per-platform tutorials. The README links to wiki pages for setup, tutorials, benchmarks and FAQ, plus a changelog, contributing guide and code of conduct. It states that MMKV does not obtain, collect or upload personal information.