Skip to content

Releases: Tencent/MMKV

v1.2.6

27 Nov 14:45
4a87d26
Compare
Choose a tag to compare

v1.2.6 / 2020-11-27

Changes for All platforms

  • Fix a file corruption when calling reKey() after removeKeys() has just been called.

Android

  • Fix compile error when MMKV_DISABLE_CRYPT is set.
  • Add a preprocess directive 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.

Flutter

Add MMKV support for Flutter on iOS & Android platform. Most things actually work!
Check out the wiki for more info.

v1.2.5

13 Nov 14:53
cd02c53
Compare
Choose a tag to compare

v1.2.5 / 2020-11-13

This is a pre-version for Flutter. The official Flutter plugin of MMKV will come out soon. Stay Tune!

iOS / macOS

  • Fix an assert error of encrypted MMKV when encoding some <NSCoding> objects.
  • Fix a potential leak when decoding duplicated keys from the file.
  • Add +[MMKV pageSize], +[MMKV version] methods.
  • Add +[MMKV defaultMMKVWithCryptKey:], you can encrypt the default MMKV instance now, just like the Android users who already enjoy this for a long time.
  • Rename -[MMKV getValueSizeForKey:] to -[MMKV getValueSizeForKey: actualSize:] to align with Android interface.

Android

  • Fix a potential crash when getting MMKV instances in multi-thread at the same time.
  • Add MMKV.version() method.

v1.2.4

21 Oct 09:08
19432b5
Compare
Choose a tag to compare

v1.2.4 / 2020-10-21

This is a hotfix mainly for iOS.

iOS / macOS

  • Fix a decode error of encrypted MMKV on some devices.

Android

  • Fix a potential issue on checking rootDir in multi-thread while MMKV initialization is not finished.

v1.2.3

16 Oct 14:20
28e867c
Compare
Choose a tag to compare

v1.2.3 / 2020-10-16

Changes for All platforms

  • Fix a potential crash on 32-bit devices due to pointer alignment issue.
  • Fix a decode error of encrypted MMKV on some 32-bit devices.

iOS / macOS

  • Fix a potential crc32() crash on some kind of arm64 devices.
  • Fix a potential crash after calling +[MMKV onAppTerminate].

Android

  • Fix a rare lock conflict on checkProcessMode().

POSIX

Add MMKV support for Python on POSIX platforms. Most things actually work!
Check out the wiki for more info.

MMKV for Python

02 Sep 09:40
66b3f41
Compare
Choose a tag to compare

Add MMKV support for Python on POSIX platforms. Most things actually work!
Check out the wiki for more info.

v1.2.2

02 Aug 16:14
464c710
Compare
Choose a tag to compare

v1.2.2 / 2020-07-30

iOS / macOS

  • Add auto clean up feature. Call +[MMKV enableAutoCleanUp:] to enable auto cleanup MMKV instances that not been accessed recently.
  • Fix a potential crash on devices under iPhone X.

Android

  • Add multi-process mode check. After so many issues had been created due to mistakenly using MMKV in multi-process mode in Android, this check is added. If an MMKV instance is accessed with SINGLE_PROCESS_MODE in multi-process, an IllegalArgumentException will be thrown.

POSIX

  • Add support for armv7 & arm64 arch on Linux.

v1.2.1

03 Jul 14:12
d34e25a
Compare
Choose a tag to compare

v1.2.1 / 2020-07-03

This is a hotfix version. Anyone who has upgraded to v1.2.0 should upgrade to this version immediately.

  • Fix a potential file corruption bug when writing a file that was created in versions older than v1.2.0. This bug was introduced in v1.2.0.
  • Add a preprocess directive MMKV_DISABLE_CRYPT to turn off MMKV encryption ability once and for all. If you integrate MMKV by source code, and if you are pretty sure encryption is not needed, you can turn that off to save some binary size.
  • The parameter relativePath (customizing a separate folder for an MMKV instance), has been renamed to rootPath. Making it clear that an absolute path is expected for that parameter.

iOS / macOS

  • -[MMKV mmkvWithID: relativePath:] is deprecated. Use -[MMKV mmkvWithID: rootPath:] instead.
  • Likewise, -[MMKV mmkvWithID: cryptKey: relativePath:] is deprecated. Use -[MMKV mmkvWithID: cryptKey: rootPath:] instead.

v1.2.0

02 Jul 07:12
b982002
Compare
Choose a tag to compare

v1.2.0 / 2020-06-30

This is the second major version of MMKV. Everything you call is the same as the last version, while almost everything underneath has been improved.

  • Reduce Memory Footprint. We used to cache all key-values in a dictionary for efficiency. From now on we store the offset of each key-value inside the mmap-memory instead, reducing memory footprint by almost half for (non-encrypt) MMKV. And the accessing efficiency is almost the same as before. As for encrypted MMKV, we can't simply store the offset of each key-value, the relative encrypt info needs to be stored as well. That will be too much for small key-values. We only store such info for large key-values (larger than 256B).
  • Improve Writeback Efficiency. Thanks to the optimization above, we now can implement writeback by simply calling memmove() multiple times. Efficiency is increased and memory consumption is down.
  • Optimize Small Key-Values. Small key-values of encrypted MMKV are still cached in memory, as all the old versions did. From now on, the struct MMBuffer will try to store small values in the stack instead of in the heap, saving a lot of time from malloc() & free(). In fact, all primitive types will be store in the stack memory.

All of the improvements above are available to all supported platforms. Here are the additional changes for each platform.

iOS / macOS

  • Optimize insert & delete. Especially for inserting new values to existing keys, or deleting keys. We now use the UTF-8 encoded keys in the mmap-memory instead of live encoding from keys, cutting the cost of string encoding conversion.
  • Fix Xcode compile error on some projects.
  • Drop the support of iOS 8. thread_local is not available on iOS 8. We choose to drop support instead of working around because iOS 8's market share is considerably small.

POSIX

  • It's known that GCC before 5.0 doesn't support C++17 standard very well. You should upgrade to the latest version of GCC to compile MMKV.

v1.1.2

29 May 12:58
fbb55e6
Compare
Choose a tag to compare

v1.1.2 / 2020-05-29

Android / iOS & macOS / Win32 / POSIX

  • Fix a potential crash after trim() a multi-process MMKV instance.
  • Improve clearAll() a bit.

v1.1.1

13 Apr 14:22
8d53020
Compare
Choose a tag to compare

v1.1.1 / 2020-04-13

iOS / macOS

  • Support WatchOS.
  • Rename +[MMKV onExit] to +[MMKV onAppTerminate], to avoid naming conflict with some other OpenSource projects.
  • Make background write protection much more robust, fix a potential crash when writing meta info in background.
  • Fix a potential data corruption bug when writing a UTF-8 (non-ASCII) key.

Android

  • Fix a crash in the demo project when the App is hot reloaded.
  • Improve wiki & readme to recommend users to init & destruct MMKV in the Application class instead of the MainActivity class.

POSIX

  • Fix two compile errors with some compilers.