What's new
- Fix a bug that MMKV will corrupt while adding just one key-value, and reboot or clear memory cache. This bug was introduced in v1.0.21.
What's new
- Fix a bug that MMKV will corrupt while adding just one key-value, and reboot or clear memory cache. This bug was introduced in v1.0.21.
What's new
- Fix a bug that MMKV will corrupt while adding just one key-value, and reboot or clear memory cache. This bug was introduced in v1.0.21.
What's new
- Fix a bug that MMKV might corrupt while repeatedly adding & removing key-value with specific length. This bug was introduced in v1.0.20.
What's new
- Fix a bug that MMKV might corrupt while repeatedly adding & removing key-value with specific length. This bug was introduced in v1.0.20.
What's new
- Fix a bug that MMKV might corrupt while repeatedly adding & removing key-value with specific length. This bug was introduced in v1.0.20.
What's new
- Fix a bug that MMKV might crash while storing key-value with specific length.
- Fix a bug that
-[MMKV trim]
might not work properly.
What's new
- Migrate to AndroidX library.
- Fix a bug that MMKV might crash while storing key-value with specific length.
- Fix a bug that
trim()
might not work properly. - Fix a bug that dead-lock might be reported by Android mistakenly.
- Using
RegisterNatives()
to simplify native method naming.
- Fix a bug that MMKV might crash while storing key-value with specific length.
- Fix a bug that
trim()
might not work properly. - Fix a bug that
clearAll()
might not work properly.
What's new
- Support Swift 5.
- Add method to get all keys
-[MMKV allKeys]
; - Add method to synchronize to file asynchronously
-[MMKV async]
. - Fix a pod configuration bug that might override target project's C++ setting on
CLANG_CXX_LANGUAGE_STANDARD
. - Fix a bug that
DEFAULT_MMAP_SIZE
might not be initialized before getting any MMKV instance. - Fix a bug that openssl's header files included inside MMKV might mess with target project's own openssl implementation.
What's new
- Support Android Q.
- Add method to synchronize to file asynchronously
void sync()
, orvoid apply()
that comes withSharedPreferences.Editor
interface. - Fix a bug that a buffer with length of zero might be returned when the key is not existed.
- Fix a bug that
DEFAULT_MMAP_SIZE
might not be initialized before getting any MMKV instance.
What's new
- Fix a bug that defaultValue was not returned while decoding a
NSCoding
value. - Fix a compile error on static linking MMKV while openssl is static linked too.
What's new
- Introducing Native Buffer. Checkout wiki for details.
- Fix a potential crash when trying to recover data from file length error.
- Protect from mistakenly passing
Context.MODE_MULTI_PROCESS
to init MMKV.
- Fix a potential crash when trying to recover data from file length error.
What's new
- Redirect logging of MMKV is supported now.
- Dynamically disable logging of MMKV is supported now.
- Add method
migrateFromUserDefaults
to import from NSUserDefaults.
What's new
- Redirect logging of MMKV is supported now.
- Dynamically disable logging of MMKV is supported now.
Note: These two are breaking changes for interfaceMMKVHandler
, update your implementation withwantLogRedirecting()
&mmkvLog()
for v1.0.17. (Interface with default method requires API level 24, sigh...) - Add option to use custom library loader
initialize(String rootDir, LibLoader loader)
. If you're facingSystem.loadLibrary()
crash on some low API level device, consider using ReLinker to load MMKV. Example can be found in mmkvdemo. - Fix a potential corruption of meta file on multi-process mode.
- Fix a potential crash when the meta file is not valid on multi-process mode.
- Redirect logging of MMKV is supported now.
- Dynamically disable logging of MMKV is supported now.
- Fix a potential corruption of meta file on multi-process mode.
What's new
- Customizing root folder of MMKV is supported now.
- Customizing folder for specific MMKV is supported now.
- Add method
getValueSizeForKey:
to get value's size of a key.
What's new
- Customizing root folder of MMKV is supported now.
- Customizing folder for specific MMKV is supported now.
- Add method
getValueSizeForKey()
to get value's size of a key. - Fix a potential crash when the meta file is not valid.
MMKV for Windows is released now. Most things actually work!
What's new
- Storing NSString/NSData/NSDate directly by calling
setString
/getSring
,setData
/getData
,setDate
/getDate
. - Fix a potential crash due to divided by zero.
What's new
- Fix a stack overflow crash due to the callback feature introduced by v1.0.13.
- Fix a potential crash due to divided by zero.
MMKV for Win32 in under construction. Hopefully will come out in next release. For those who are interested, check out branch dev_win32
for the latest development.
What's new
- Setting
nil
value to reset a key is supported now. - Rename
boolValue(forKey:)
tobool(forKey:)
for Swift.
What's new
Parcelable
objects can be stored directly into MMKV now.- Setting
null
value to reset a key is supported now. - Fix an issue that MMKV's file size might expand unexpectly large in some case.
- Fix an issue that MMKV might crash on multi-thread removing and getting on the same key.
What's new
- Special chars like
/
are supported in MMKV now. The file name of MMKV with special mmapID will be encoded with md5 and stored in seperate folder. - Add callback for MMKV error handling. You can make MMKV to recover instead of discard when crc32 check fail happens.
- Add
trim
andclose
operation. Generally speaking they are not necessary in daily usage. Use them if you worry about disk / memory / fd usage. - Fix an issue that MMKV's file size might expand unexpectly large in some case.
Known Issues
- Setting
nil
value to reset a key will be ignored. Useremove
instead.
What's new
- Add static linked of libc++ to trim AAR size. Use it when there's no other lib in your App embeds
libc++_shared.so
. Or if you already have an older version oflibc++_shared.so
that doesn't agree with MMKV.
Addimplementation 'com.tencent:mmkv-static:1.0.13'
to your App's gradle setting to integrate. - Special chars like
/
are supported in MMKV now. The file name of MMKV with special mmapID will be encoded with md5 and stored in seperate folder. - Add callback for MMKV error handling. You can make MMKV to recover instead of discard when crc32 check fail happens.
- Add
trim
andclose
operation. Generally speaking they are not necessary in daily usage. Use them if you worry about disk / memory / fd usage.
Known Issues
- Setting
null
value to reset a key will be ignored. Useremove
instead. - MMKV's file size might expand unexpectly large in some case.
What's new
- Fix
mlock
fail on some devices - Fix a performance issue caused by mistakenly merge of test code
- Fix CocoaPods integration error of macOS
What's new
- Fix
remove()
causing data inconsistency onMULTI_PROCESS_MODE
What's new
- Port to macOS
- Support NSCoding
You can store NSArray/NSDictionary or any object what implements<NSCoding>
protocol. - Redesign Swift interface
- Some performance improvement
Known Issues
- MMKV use mmapID as its filename, so don't contain any
/
inside mmapID. - Storing a value of
type A
and getting bytype B
may not work. MMKV does type erasure while storing values. That means it's hard for MMKV to do value-type-checking, if not impossible.
What's new
- Some performance improvement
Known Issues
- Getting a MMKV instance with mmapID that contains
/
may fail.
MMKV uses mmapID as its filename, so don't contain any/
inside mmapID. - Storing a value of
type A
and getting bytype B
may not work.
MMKV does type erasure while storing values. That means it's hard for MMKV to do value-type-checking, if not impossible. registerOnSharedPreferenceChangeListener
not supported.
This is intended. We believe doing data-change-listener inside a storage framework smells really bad to us. We suggest using something like event-bus to notify any interesting clients.
- Initial Release