Bot releases are visible (Hide)
trim()
more robust in multi-process mode.::unlink()
.Published by lingol 9 months ago
removeStorage()
static method to safely delete underlying files of an MMKV instance.null
is returned when the value is in fact an empty ByteArray.FastNative
naming conflict.androidx.annotation
to v1.7.1.memcpy()
.MMKV_DISABLE_CRYPT
is on.Published by lingol 11 months ago
Among most of the features added in this version, the credit goes to @kaitian521.
SINGLE_PROCESS_MODE
.SINGLE_PROCESS_MODE
.clearAll()
with keeping file disk space unchanged, reducing the need to expand file size on later insert & update operations. This feature is off by default, you will have to call it with relative params or newly added methods.zeroFill()
, will lead to a crash.std::exception
.-O2
optimization level by default, which will reduce native lib size and improve read/write speed a little bit.@fastNative
annotation on enableCompareBeforeCompare()
to speed up JNI call.-Wl,-weak_reference_mismatches,weak
or -Wl,-ld_classic
options to the OTHER_LDFLAGS
build setting of Xcode 15. Note that these options are not recognized by older versions of Xcode.Published by lingol about 1 year ago
This is a hotfix version. It's highly recommended that v1.2.16 & v1.3.0 users upgrade as soon as possible.
count()
& allKeys()
methods when auto key expiration is turn on.msync()
call on newly created MMKV instances.Published by lingol over 1 year ago
Published by lingol over 1 year ago
Published by lingol almost 2 years ago
initialize()
.lock()
/unlock()
/try_lock()
is not thread-safe.sdkInt
, avoid unnecessary risk on Android App Review.+[MMKV initializeMMKV:]
manually before calling any MMKV methods.Published by lingol about 2 years ago
MMKV.getXXX()
may return invalid results in multi-process mode.[]
instead of null
on empty StringSet
from MMKV.decodeStringSet()
methods.32
.-[MMKV getObject:forKey:]
method when the key-value doesn't exist.Published by lingol over 2 years ago
MMKV_DISABLE_CRYPT
macro is defined.-[MMKV getXXX:forKey:hasValue:]
methods.MMKV::getXXX(key, defaultValue, hasValue)
methods.MMKV::getXXX(key, defaultValue, hasValue)
methods.Published by lingol almost 3 years ago
clearAll()
call may fail to take effect in multi-process mode.compileSdkVersion
& targetSdkVersion
from 30
to 31
.Published by lingol almost 3 years ago
libc++
by default. Starting from v1.2.11, com.tencent:mmkv-static
is the same as com.tencent:mmkv
.libc++_shared
, you could use com.tencent:mmkv-shared
instead.Published by lingol over 3 years ago
This version is mainly for Android & Flutter.
MMKV.mmkvWithID()
from returning null
to throwing exceptions on any error.MMKV.actualSize()
to get the actual used size of the file.MMKV.commit()
& MMKV.apply()
as deprecated, to avoid some misuse after migration from SharedPreferences to MMKV.This version is mainly for Android & Flutter.
libc++
, we have decided to upgrade MMKV's building NDK in this release. That means we can't support armeabi anymore. Those who still in need of armeabi can build from sources by following the instruction in the wiki.We really appreciate your understanding.
MMKV.encodeString()
with an empty string value on Android, MMKV.decodeString()
will return null
.MMKV.defaultMMKV()
on Android might fail to load, you can try calling MMKV.defaultMMKV(cryptKey: '\u{2}U')
with an encrytion key '\u{2}U'
instead.Published by lingol over 3 years ago
This will be the last version that supports armeabi arch on Android. To avoid some crashed on the old NDK (r16b), and make the most of a more stable libc++
, we have decided to upgrade MMKV's building NDK in the next release. That means we can't support armeabi anymore.
We really appreciate your understanding.
MMKV.disableProcessModeChecker()
. There are some native crash reports due to the process mode checker. You can disable it manually.MMKV.initialize()
to customize the root directory, a context
parameter is required now.encodeString()
with an empty string value.Known Issue on Flutter
encodeString()
with an empty string value on Android, decodeString()
will return null
. This bug will be fixed in the next version of Android Native Lib. iOS does not have such a bug.Published by lingol almost 4 years ago
Happy holidays everyone!
sync()
with false
won't do msync()
asynchronous and won't return immediately.putStringSet()
with null
.MMKV.initialize()
with both Context
and LibLoader
parammeters.Add golang for POSIX platforms. Most things actually work!. Check out the wiki for information.
Published by lingol almost 4 years ago
Add MMKV support for Golang on POSIX platforms. Most things actually work!
Check out the wiki for more info.
Published by lingol almost 4 years ago
reKey()
after removeKeys()
has just been called.MMKV_DISABLE_CRYPT
is set.MMKV_DISABLE_FLUTTER
to disable flutter plugin features. If you integrate MMKV by source code, and if you are pretty sure the flutter plugin is not needed, you can turn that off to save some binary size.Add MMKV support for Flutter on iOS & Android platform. Most things actually work!
Check out the wiki for more info.
Published by lingol almost 4 years ago
This is a pre-version for Flutter. The official Flutter plugin of MMKV will come out soon. Stay Tune!
<NSCoding>
objects.+[MMKV pageSize]
, +[MMKV version]
methods.+[MMKV defaultMMKVWithCryptKey:]
, you can encrypt the default MMKV instance now, just like the Android users who already enjoy this for a long time.-[MMKV getValueSizeForKey:]
to -[MMKV getValueSizeForKey: actualSize:]
to align with Android interface.MMKV.version()
method.Published by lingol almost 4 years ago
This is a hotfix mainly for iOS.
rootDir
in multi-thread while MMKV initialization is not finished.Published by lingol about 4 years ago
crc32()
crash on some kind of arm64 devices.+[MMKV onAppTerminate]
.checkProcessMode()
.Add MMKV support for Python on POSIX platforms. Most things actually work!
Check out the wiki for more info.