Store user preferences and settings in mobile apps without writing custom database code.
Cache session data or temporary state that persists across app restarts.
Share configuration data safely between multiple processes on the same device.
MMKV is a key-value storage library originally developed for use in the WeChat application and open-sourced by Tencent. Key-value storage is the simplest form of database: you save a piece of data under a label (the key) and retrieve it later using that same label. MMKV is designed to be fast, small in binary size, and easy to drop into mobile and desktop apps. It works on Android, iOS, macOS, Windows, POSIX-compatible systems, and HarmonyOS NEXT. The library uses two techniques to achieve its performance: mmap, which keeps a file on disk continuously synchronized with a region of memory so that writes are almost instant, and Protocol Buffers (protobuf), Google's compact binary format for encoding data. A key convenience feature is that all changes are saved immediately, there is no separate save, sync, or apply call needed. On Android, MMKV also supports multi-process access, meaning multiple separate processes running on the same device can safely read and write to the same storage simultaneously. Installation differs by platform. Android projects add it through Maven (a package repository). iOS and macOS projects use CocoaPods (another package manager). Windows projects integrate the source directly. The library adds roughly 50KB to Android app size per CPU architecture, less than 30KB on iOS, and about 10KB on Windows. Bindings also exist for Flutter, Kotlin, Golang, and other languages beyond the native C++ core.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.