506 Commits

Author SHA1 Message Date
guoling 21874201c1 tidy 2026-06-03 09:55:32 +08:00
guoling a12924c235 Add KMP platform parity APIs 2026-06-03 09:55:32 +08:00
guoling 5892e0ff3b fix expireDuration overflow bug #1665 2026-06-02 19:06:09 +08:00
guoling 68901025b1 add log 2026-06-02 16:58:56 +08:00
guoling de70a23783 Fix oversized key corrupting data due to uint16_t overflow in KeyValueHolder
Keys longer than 65531 bytes cause keySize and computedKVSize (both uint16_t)
to wrap around, silently corrupting the internal offset so that subsequent reads
return garbage. Reject keys exceeding the safe threshold (UINT16_MAX - 4) at
all write and parse entry points.
2026-04-08 16:08:59 +08:00
guoling 7224f0aa8f Fix -Wmissing-braces 2026-03-27 16:23:03 +08:00
guoling 6a55c88536 enhance random iv 2026-03-25 12:46:48 +08:00
guoling 58920f50e1 update C++ demo code with MMKVHandler 2026-03-25 12:25:12 +08:00
guoling 050d8c874f add NameSpace to c bridge 2026-03-24 19:44:51 +08:00
guoling 3cf58a3777 add win32 & linux support for kmp 2026-03-24 13:29:14 +08:00
guoling 3f2b3999f4 Add universal C interface (cbridge) for MMKV Core
Provide a language-agnostic C99 bridge using standard C types (const char*,
void*, int64_t, etc.) so MMKV Core can be consumed from C-only environments

- Core/cbridge/MMKVBridge.h: pure C header with mmkv_ prefixed API
- Core/cbridge/MMKVBridge.cpp: implementation wrapping MMKV C++ API
- POSIX/demo/demo_c.c: pure C demo exercising all API surface
- CMakeLists.txt updates for core library and demo_c target
2026-03-24 13:28:38 +08:00
guoling a745e6bcaf fix cpp error 2026-03-19 15:41:19 +08:00
guoling f3ddc30bdc add MMKVHandler.h to CocoaPods public headers and SPM fakeinclude 2026-03-18 16:23:05 +08:00
guoling 9348a93f26 refactor callback system into unified MMKVHandler across all platforms
Replace 4 separate static function pointers (LogHandler, ErrorHandler,
ContentChangeHandler, ContentLoadedHandler) with a single MMKVHandler
abstract class in Core C++. Update all 6 platform wrappers (iOS, Android,
OHOS, Python, Golang, Flutter) to use adapter classes bridging to the new
unified handler. Add onMMKVContentLoadSuccessfully callback to Android,
OHOS, Flutter, Python and Golang where it was previously missing.
2026-03-18 12:40:05 +08:00
guoling f4cb2357bc drop oldstyle actual size downgrade support 2026-03-03 20:10:30 +08:00
guoling fec30f74c7 robust check on encryption mode #1642 2026-02-24 15:21:51 +08:00
guoling 683382f3d8 add getBytes() with string_view key for ObjC++ 2026-02-24 10:56:18 +08:00
guoling b56ce1004f merge ashmem size with expectedCapacity on Android & OHOS 2026-02-11 12:39:08 +08:00
guoling ffcb07ee9f add default mmkv with config for iOS 2026-02-09 20:06:09 +08:00
guoling ed0cade7e8 add MMKVConfig for Android 2026-02-06 20:28:19 +08:00
guoling 1915d892f1 add MMKVConfig 2026-02-05 17:21:53 +08:00
guoling ac1817575d fix fcntl() OFD lock failure on ashmem #261 #1637 2026-02-02 16:05:38 +08:00
Guo Ling f6e6fbc5e0 convert log message to utf-8 by (changing src in utf-8) for win32 client 2026-01-30 18:04:08 +08:00
Guo Ling 59b6762dfd change log to debug 2026-01-30 16:03:42 +08:00
guoling 8599d2eb95 convert log message to utf-8 for win32 client 2026-01-29 20:49:01 +08:00
guoling 96390cc85a verify all page in win32 for corrupted file 2026-01-29 15:27:48 +08:00
guoling 2f5e86f239 support Swift Package Manager #535 2026-01-28 17:01:53 +08:00
guoling 9789080b25 fix iOS compile error on tryAtomicRename() 2025-12-29 17:05:54 +08:00
guoling e439582ab7 protect from m_file not valid for isDiskOfMMAPFileCorrupted() 2025-12-25 12:06:49 +08:00
hossinasaadi 6acdef76d0 fix 2025-12-22 17:56:48 +03:30
hossinasaadi e8dba7762f fix public interface 2025-12-22 15:23:58 +03:30
hossinasaadi df721fa6cd add onMMKVContentLoadSuccessfully to content notify handler 2025-12-21 17:39:57 +03:30
guoling c708914c04 protect from delete file failure on corrupted files 2025-12-18 19:33:30 +08:00
guoling d99404baeb reduce absolutePath() call as much as possible 2025-12-16 18:32:19 +08:00
guoling 0307e43ed7 add aes256 option on Android 2025-11-28 17:26:09 +08:00
guoling 8cb70d1123 add aes256 option on mmkv creation 2025-11-27 16:02:49 +08:00
guoling 3163817697 fix single key override bug on upgrading from a v1.1.x version #1605 2025-11-24 16:07:16 +08:00
guoling 09c27e6d7b protect from file size change on multi-process load #1599 2025-11-24 11:54:11 +08:00
guoling d18e2b92a7 protect from weakly_canonical() exception 2025-11-11 12:32:45 +08:00
guoling 8b7eb242cb fix readonly crash #1597 2025-10-21 16:45:32 +08:00
guoling f22e1921ff upgrade android deps 2025-09-24 14:24:43 +08:00
guoling 2ba8ff9bc0 support AES 256 2025-09-24 11:55:35 +08:00
guoling 0fce41f270 opt move assignment operator of MMBuffer 2025-09-18 19:33:14 +08:00
guoling 299bb09a56 fix Android compile error 2025-08-20 17:23:02 +08:00
guoling 99ec377bc4 fix special relative path not created bug 2025-08-20 12:04:53 +08:00
guoling 0d83c15fcb tidy include 2025-08-11 15:15:48 +08:00
zhongwuzw a006112fb0 Fixes build error when unset MMKV_APPLE on apple platforms 2025-06-01 10:33:00 +08:00
guoling 048b1808ed add MMKVHandler.getNativeLogHandler() for Android 2025-05-12 16:21:33 +08:00
guoling 8093cb35e1 prepare for v2.2.2 2025-05-08 11:52:46 +08:00
guoling 467c44af67 opt Win32 load from file speed 2025-05-07 15:50:53 +08:00