Skip to content

v2.0.2

Compare
Choose a tag to compare
@lingol lingol released this 27 Dec 13:22
5019dd8

v2.0.2 / 2024-12-27

Mary holiday and a happy new year!

For all those who suffer from incorrect file names in Android/OHOS, we are planning a new feature called NameSpace, specifically, and will solve this problem once and for all. Under this feature, a previously incorrect file name will be migrated to the correct file name under a custom root path.

However, this also means that once upgraded, the file will no longer be accessed by older versions of MMKV/your App, which will be a problem if your team member or your users do some downgrade operation. To address this issue, we have provided a forward support version of MMKV that supports reading upgraded/correct file names, and it's released as v2.0.2.

So please upgrade to v2.0.2 and get prepared for this shiny new feature NameSpace.

Changes for All platforms

  • Fix a bug that MMKV might fail to backup/restore across different filesystems.
  • Add protection from invalid value size of auto-key-expire mmkv.

Android

  • If the running App is 32-bit only, warn about it (by throwing UnsupportedArchitectureException) before trying to load native lib.
  • Add forward support for the correct filename with a custom root path.

HarmonyOS NEXT

  • Obfuscation fully supported.
  • Use atomic file rename on OHOS.
  • Add forward support for the correct filename with a custom root path.

Win32

  • Only mmap() on ftruncate()/zeroFillFile() failure iff we have a valid file mapping before.