@react-native-ohos/react-native-mmkv 3.3.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MMKV/Core/CMakeLists.txt +172 -0
- package/MMKV/Core/CodedInputData.cpp +252 -0
- package/MMKV/Core/CodedInputData.h +87 -0
- package/MMKV/Core/CodedInputDataCrypt.cpp +280 -0
- package/MMKV/Core/CodedInputDataCrypt.h +87 -0
- package/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
- package/MMKV/Core/CodedInputData_OSX.cpp +92 -0
- package/MMKV/Core/CodedOutputData.cpp +186 -0
- package/MMKV/Core/CodedOutputData.h +88 -0
- package/MMKV/Core/Core.xcodeproj/project.pbxproj +707 -0
- package/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
- package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
- package/MMKV/Core/InterProcessLock.cpp +186 -0
- package/MMKV/Core/InterProcessLock.h +119 -0
- package/MMKV/Core/InterProcessLock_Android.cpp +103 -0
- package/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
- package/MMKV/Core/KeyValueHolder.cpp +236 -0
- package/MMKV/Core/KeyValueHolder.h +122 -0
- package/MMKV/Core/MMBuffer.cpp +210 -0
- package/MMKV/Core/MMBuffer.h +111 -0
- package/MMKV/Core/MMKV.cpp +1702 -0
- package/MMKV/Core/MMKV.h +595 -0
- package/MMKV/Core/MMKVLog.cpp +127 -0
- package/MMKV/Core/MMKVLog.h +86 -0
- package/MMKV/Core/MMKVLog_Android.cpp +134 -0
- package/MMKV/Core/MMKVMetaInfo.hpp +99 -0
- package/MMKV/Core/MMKVPredef.h +293 -0
- package/MMKV/Core/MMKV_Android.cpp +261 -0
- package/MMKV/Core/MMKV_IO.cpp +1905 -0
- package/MMKV/Core/MMKV_IO.h +57 -0
- package/MMKV/Core/MMKV_OSX.cpp +423 -0
- package/MMKV/Core/MMKV_OSX.h +57 -0
- package/MMKV/Core/MemoryFile.cpp +603 -0
- package/MMKV/Core/MemoryFile.h +194 -0
- package/MMKV/Core/MemoryFile_Android.cpp +236 -0
- package/MMKV/Core/MemoryFile_Linux.cpp +125 -0
- package/MMKV/Core/MemoryFile_OSX.cpp +142 -0
- package/MMKV/Core/MemoryFile_Win32.cpp +554 -0
- package/MMKV/Core/MiniPBCoder.cpp +672 -0
- package/MMKV/Core/MiniPBCoder.h +151 -0
- package/MMKV/Core/MiniPBCoder_OSX.cpp +237 -0
- package/MMKV/Core/PBEncodeItem.hpp +104 -0
- package/MMKV/Core/PBUtility.cpp +61 -0
- package/MMKV/Core/PBUtility.h +148 -0
- package/MMKV/Core/ScopedLock.hpp +69 -0
- package/MMKV/Core/ThreadLock.cpp +75 -0
- package/MMKV/Core/ThreadLock.h +81 -0
- package/MMKV/Core/ThreadLock_Win32.cpp +89 -0
- package/MMKV/Core/aes/AESCrypt.cpp +273 -0
- package/MMKV/Core/aes/AESCrypt.h +112 -0
- package/MMKV/Core/aes/openssl/openssl_aes-armv4.S +1243 -0
- package/MMKV/Core/aes/openssl/openssl_aes.h +130 -0
- package/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
- package/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
- package/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
- package/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
- package/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
- package/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
- package/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
- package/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
- package/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
- package/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
- package/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
- package/MMKV/Core/core.vcxproj +288 -0
- package/MMKV/Core/core.vcxproj.filters +150 -0
- package/MMKV/Core/crc32/Checksum.h +75 -0
- package/MMKV/Core/crc32/crc32_armv8.cpp +134 -0
- package/MMKV/Core/crc32/zlib/CMakeLists.txt +60 -0
- package/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
- package/MMKV/Core/crc32/zlib/crc32.h +48 -0
- package/MMKV/Core/crc32/zlib/zconf.h +380 -0
- package/MMKV/Core/crc32/zlib/zutil.h +25 -0
- package/MMKV/README.md +354 -0
- package/README.md +5 -0
- package/cpp/MMKVManagedBuffer.h +32 -0
- package/cpp/MmkvHostObject.cpp +355 -0
- package/cpp/MmkvHostObject.h +32 -0
- package/cpp/MmkvLogger.h +35 -0
- package/cpp/NativeMmkvModule.cpp +43 -0
- package/cpp/NativeMmkvModule.h +38 -0
- package/harmony/reactNativeMMKV/BuildProfile.ets +17 -0
- package/harmony/reactNativeMMKV/LICENSE +20 -0
- package/harmony/reactNativeMMKV/NOTICE +34 -0
- package/harmony/reactNativeMMKV/README.OpenSource +11 -0
- package/harmony/reactNativeMMKV/build-profile.json5 +9 -0
- package/harmony/reactNativeMMKV/hvigorfile.ts +6 -0
- package/harmony/reactNativeMMKV/index.ets +24 -0
- package/harmony/reactNativeMMKV/oh-package.json5 +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/CMakeLists.txt +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/ComponentDescriptors.h +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/EventEmitters.cpp +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/EventEmitters.h +182 -0
- package/harmony/reactNativeMMKV/src/main/cpp/HarmonyLogger.cpp +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.clang-format +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.dockerignore +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.github/FUNDING.yml +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.github/ISSUE_TEMPLATE/bug_report.md +45 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.gitmodules +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/build.gradle +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/checkstyle.xml +156 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/debug.keystore +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/android-publish-private.gradle +207 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/android-publish.gradle +276 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/build_library.gradle +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/check.gradle +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle.properties +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradlew +172 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradlew.bat +84 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/CMakeLists.txt +56 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/build.gradle +238 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/gradle.properties +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/proguard-rules.pro +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/AndroidManifest.xml +11 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/java/com/tencent/mmkv/MMKVTest.java +270 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/java/com/tencent/mmkv/MMKVTestService.java +79 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/AndroidManifest.xml +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/aidl/com/tencent/mmkv/ParcelableMMKV.aidl +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/cpp/flutter-bridge.cpp +706 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/cpp/native-bridge.cpp +1244 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKV.java +2024 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentChangeNotification.java +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentProvider.java +174 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVHandler.java +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVLogLevel.java +52 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVProcessUtil.java +100 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVRecoverStrategic.java +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NameSpace.java +214 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NativeBuffer.java +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/ParcelableMMKV.java +108 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/UnsupportedArchitectureException.java +27 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/build.gradle +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/src/main/AndroidManifest.xml +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/src/main/java/dalvik/annotation/optimization/FastNative.java +104 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/build.gradle +116 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/proguard-rules.pro +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/AndroidManifest.xml +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/aidl/com/tencent/mmkvdemo/IAshmemMMKV.aidl +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/cpp/CMakeLists.txt +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/cpp/mmkvdemo.cpp +245 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/Baseline.java +297 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/BenchMarkBaseService.java +363 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/FakeInfo.java +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/Info.java +69 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MainActivity.java +1029 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MultiProcessSharedPreferences.java +710 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyApplication.java +130 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService.java +105 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService_1.java +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/SQLiteKV.java +143 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/TestParcelable.java +70 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/kotlin/KotlinUsecase.kt +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/layout/activity_main.xml +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/colors.xml +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/strings.xml +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/styles.xml +11 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/pmd-ruleset.xml +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/proguard-rules/proguard-rules-android-lib.pro +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/proguard-rules/proguard-rules-test.pro +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/settings.gradle +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CHANGELOG.md +979 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CODE_OF_CONDUCT.md +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CONTRIBUTING.md +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CMakeLists.txt +207 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData.cpp +248 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData.h +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt.cpp +276 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt.h +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData_OSX.cpp +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedOutputData.cpp +182 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedOutputData.h +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.pbxproj +703 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock.cpp +211 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock.h +124 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock_Android.cpp +104 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/KeyValueHolder.cpp +237 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/KeyValueHolder.h +122 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMBuffer.cpp +207 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMBuffer.h +119 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV.cpp +1791 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV.h +781 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog.cpp +127 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog.h +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog_Android.cpp +134 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVMetaInfo.hpp +99 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVPredef.h +310 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_Android.cpp +365 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_IO.cpp +2049 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_IO.h +85 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_OSX.cpp +589 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_OSX.h +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile.cpp +716 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile.h +212 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Android.cpp +247 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Linux.cpp +126 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_OSX.cpp +173 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Win32.cpp +655 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder.cpp +668 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder.h +150 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder_OSX.cpp +237 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBEncodeItem.hpp +102 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBUtility.cpp +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBUtility.h +148 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ScopedLock.hpp +69 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock.cpp +75 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock.h +81 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock_Win32.cpp +89 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/AESCrypt.cpp +293 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/AESCrypt.h +117 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes.h +98 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/core.vcxproj +288 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/core.vcxproj.filters +150 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/CMakeLists.txt +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/Checksum.h +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/crc32_armv8.cpp +134 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/crc32.h +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/zconf.h +380 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/zutil.h +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Dockerfile +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/LICENSE.TXT +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.podspec +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.xcworkspace/contents.xcworkspacedata +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVAppExtension.podspec +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVCore.podspec +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVWatchExtension.podspec +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Makefile +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/app.json5 +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/resources/base/element/string.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/resources/base/media/app_icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/BuildProfile.ets +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/CHANGELOG.md +75 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/Index.ets +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/README.md +208 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/build-profile.json5 +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/consumer-rules.txt +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/example/Index.ets +686 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/example/Util.ets +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/hvigorfile.ts +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/obfuscation-rules.txt +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/oh-package.json5 +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/CMakeLists.txt +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/flutter-bridge.cpp +703 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/native_bridge.cpp +1840 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/index.d.ts +80 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/oh-package.json5 +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKV.ets +1073 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKVHandler.ets +111 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKVLogLevel.ets +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/NativeBuffer.ets +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/Util.ts +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/module.json5 +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/build-profile.json5 +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/dependencies/hvigor-4.3.0.tgz +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/dependencies/hvigor-ohos-plugin-4.3.0.tgz +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/build-profile.json5 +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/hvigorfile.ts +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/obfuscation-rules.txt +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/oh-package.json5 +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/CMakeLists.txt +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/napi_init.cpp +233 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/types/libentry/index.d.ts +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/types/libentry/oh-package.json5 +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/Baseline.ets +188 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/MyMMKVHandler.ets +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/Util.ets +220 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/entryability/EntryAbility.ets +107 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/pages/Index.ets +766 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/process/DemoProcess.ets +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/module.json5 +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/element/color.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/background.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/foreground.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/layered_image.json +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/en_US/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/zh_CN/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/mock/mock-config.json5 +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/test/Ability.test.ets +55 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/test/List.test.ets +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testability/TestAbility.ets +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testability/pages/Index.ets +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets +110 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/module.json5 +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/element/color.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/media/icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/profile/test_pages.json +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/test/List.test.ets +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/test/LocalUnit.test.ets +53 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/hvigor/hvigor-config.json5 +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/hvigorfile.ts +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/oh-package.json5 +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/CMakeLists.txt +27 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/CMakeLists.txt +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/TestInterProcessLock.cpp +130 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/UnitTest.cpp +272 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/demo.cpp +1431 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/process.cpp +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/CMakeLists.txt +87 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/callback.go +121 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/go.mod +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/golang-bridge.cpp +731 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/golang-bridge.h +131 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/mmkv.go +817 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/mmkv_test.go +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/test/go.mod +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/test/main.go +455 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/src/CMakeLists.txt +83 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/src/libmmkv.cpp +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/CMakeLists.txt +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/README.md +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/demo.py +368 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/libmmkv_python.cpp +454 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.appveyor.yml +35 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.clang-format +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.clang-tidy +77 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.cmake-format.yaml +73 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.codespell-ignore-lines +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.gitattributes +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/CODEOWNERS +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/CONTRIBUTING.md +388 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/dependabot.yml +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/labeler.yml +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/labeler_merged.yml +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/matchers/pylint.json +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/pull_request_template.md +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/ci.yml +1233 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/configure.yml +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/format.yml +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/labeler.yml +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/pip.yml +117 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/upstream.yml +116 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.pre-commit-config.yaml +156 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.readthedocs.yml +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/CMakeLists.txt +375 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/LICENSE +29 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/MANIFEST.in +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/README.rst +181 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/SECURITY.md +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/Doxyfile +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/_static/css/custom.css +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/chrono.rst +81 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/custom.rst +93 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/eigen.rst +310 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/functional.rst +109 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/index.rst +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/overview.rst +170 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/stl.rst +249 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/strings.rst +296 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/classes.rst +1335 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/embedding.rst +262 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/exceptions.rst +401 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/functions.rst +614 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/misc.rst +429 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/index.rst +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/numpy.rst +453 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/object.rst +286 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/utilities.rst +155 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/smart_ptrs.rst +174 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/basics.rst +307 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/benchmark.py +89 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/benchmark.rst +95 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/changelog.rst +3121 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/classes.rst +555 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/cmake/index.rst +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/compiling.rst +726 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/conf.py +369 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/faq.rst +308 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/index.rst +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/installing.rst +105 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/limitations.rst +72 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11-logo.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python1.svg +427 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python2.svg +427 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/reference.rst +130 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/release.rst +143 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/requirements.in +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/requirements.txt +275 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/upgrade.rst +594 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/attr.h +690 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/buffer_info.h +208 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/cast.h +1848 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/chrono.h +225 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/common.h +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/complex.h +74 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/class.h +754 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/common.h +1268 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/descr.h +172 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/init.h +434 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/internals.h +749 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/type_caster_base.h +1214 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/typeid.h +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/common.h +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/matrix.h +714 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/tensor.h +517 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen.h +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/embed.h +313 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eval.h +156 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/functional.h +138 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/gil.h +219 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/gil_safe_call_once.h +91 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/iostream.h +265 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/numpy.h +2135 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/operators.h +202 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/options.h +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/pybind11.h +3026 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/pytypes.h +2604 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl/filesystem.h +115 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl.h +448 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl_bind.h +822 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/type_caster_pyobject_ptr.h +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/typing.h +239 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/noxfile.py +107 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/__init__.py +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/__main__.py +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/_version.py +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/commands.py +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/py.typed +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/setup_helpers.py +500 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pyproject.toml +87 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/setup.cfg +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/setup.py +149 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/CMakeLists.txt +589 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/conftest.py +224 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/constructor_stats.h +322 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/cross_module_gil_utils.cpp +111 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/cross_module_interleaved_error_already_set.cpp +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/eigen_tensor_avoid_stl_array.cpp +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/env.py +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_python_package/pytest.ini +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_python_package/test_files.py +296 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_setuptools/pytest.ini +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_setuptools/test_setuphelper.py +153 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/local_bindings.h +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/object.h +205 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_cross_module_tests.cpp +149 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_tests.cpp +131 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_tests.h +98 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pytest.ini +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/requirements.txt +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_async.cpp +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_async.py +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_buffers.cpp +259 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_buffers.py +230 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_builtin_casters.cpp +387 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_builtin_casters.py +530 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_call_policies.cpp +113 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_call_policies.py +249 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_callbacks.cpp +280 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_callbacks.py +227 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_chrono.cpp +81 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_chrono.py +207 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_class.cpp +656 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_class.py +503 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/CMakeLists.txt +80 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/embed.cpp +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +46 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/main.cpp +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/test.py +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_const_name.cpp +55 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_const_name.py +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_constants_and_functions.cpp +158 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_constants_and_functions.py +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_copy_move.cpp +544 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_copy_move.py +140 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_casters.cpp +217 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_casters.py +124 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_setup.cpp +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_setup.py +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_docstring_options.cpp +129 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_docstring_options.py +66 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_matrix.cpp +443 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_matrix.py +816 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.cpp +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.inl +332 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.py +290 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/CMakeLists.txt +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/catch.cpp +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/external_module.cpp +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_interpreter.cpp +488 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_interpreter.py +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_trampoline.py +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_enum.cpp +133 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_enum.py +270 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval.cpp +118 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval.py +52 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval_call.py +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.cpp +388 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.h +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.py +434 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_factory_constructors.cpp +430 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_factory_constructors.py +518 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_gil_scoped.cpp +144 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_gil_scoped.py +244 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_iostream.cpp +126 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_iostream.py +293 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_kwargs_and_defaults.cpp +325 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_kwargs_and_defaults.py +428 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_local_bindings.cpp +106 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_local_bindings.py +259 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_methods_and_attributes.cpp +492 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_methods_and_attributes.py +539 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_modules.cpp +125 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_modules.py +118 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_multiple_inheritance.cpp +341 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_multiple_inheritance.py +495 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_array.cpp +547 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_array.py +672 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_dtypes.cpp +639 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_dtypes.py +448 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_vectorize.cpp +107 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_vectorize.py +268 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_opaque_types.cpp +77 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_opaque_types.py +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_operator_overloading.cpp +281 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_operator_overloading.py +153 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pickling.cpp +194 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pickling.py +95 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_python_multiple_inheritance.cpp +45 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_python_multiple_inheritance.py +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pytypes.cpp +926 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pytypes.py +1050 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_sequences_and_iterators.cpp +600 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_sequences_and_iterators.py +267 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_smart_ptr.cpp +473 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_smart_ptr.py +317 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl.cpp +549 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl.py +383 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl_binders.cpp +275 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl_binders.py +395 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_tagbased_polymorphic.cpp +147 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_tagbased_polymorphic.py +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_thread.cpp +66 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_thread.py +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_type_caster_pyobject_ptr.cpp +167 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_type_caster_pyobject_ptr.py +122 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_union.cpp +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_union.py +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_a.cpp +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_a.py +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_b.cpp +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_b.py +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_vector_unique_ptr_member.cpp +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_vector_unique_ptr_member.py +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_virtual_functions.cpp +592 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_virtual_functions.py +460 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/valgrind-numpy-scipy.supp +140 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/valgrind-python.supp +117 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindCatch.cmake +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindEigen3.cmake +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindPythonLibsNew.cmake +310 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/JoinPaths.cmake +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/check-style.sh +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/cmake_uninstall.cmake.in +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/codespell_ignore_lines_from_errors.py +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/libsize.py +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/make_changelog.py +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11.pc.in +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Common.cmake +429 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Config.cmake.in +233 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11GuessPythonExtSuffix.cmake +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11NewTools.cmake +341 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Tools.cmake +239 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pyproject.toml +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/setup_global.py.in +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/setup_main.py.in +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake +161 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/setup.py +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/unit_test.py +209 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/README.md +357 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/README_CN.md +301 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/SECURITY.md +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Script/dumpJavaSignature.py +144 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Script/formatCode.py +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/.clang-format +35 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32.sln +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.cpp +548 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.vcxproj +190 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.vcxproj.filters +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/pch.cpp +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/pch.h +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.cpp +88 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.vcxproj +188 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.vcxproj.filters +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/pch.cpp +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/pch.h +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.metadata +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.vscode/launch.json +162 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.vscode/settings.json +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/CHANGELOG.md +196 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/README.md +217 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/analysis_options.yaml +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/README.md +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/build.gradle +79 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/AndroidManifest.xml +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/java/com/tencent/mmkv_example/MainActivity.java +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/drawable/launch_background.xml +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/values/styles.xml +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/profile/AndroidManifest.xml +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/build.gradle +29 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/gradle.properties +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/settings.gradle +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/settings_aar.gradle +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/AppFrameworkInfo.plist +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/Debug.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/Release.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/ephemeral/flutter_lldb_helper.py +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/ephemeral/flutter_lldbinit +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Podfile +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/AppDelegate.h +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/AppDelegate.m +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Base.lproj/Main.storyboard +29 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Info.plist +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Runner.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/main.m +29 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.pbxproj +612 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +90 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/lib/main.dart +565 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/CMakeLists.txt +128 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/CMakeLists.txt +88 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugin_registrant.cc +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugin_registrant.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugins.cmake +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/CMakeLists.txt +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/main.cc +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/my_application.cc +130 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/my_application.h +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/Flutter-Debug.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/Flutter-Release.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/GeneratedPluginRegistrant.swift +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Podfile +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/AppDelegate.swift +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Base.lproj/MainMenu.xib +343 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/AppInfo.xcconfig +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Debug.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Release.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Warnings.xcconfig +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/DebugProfile.entitlements +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Info.plist +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/MainFlutterWindow.swift +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Release.entitlements +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/project.pbxproj +800 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +99 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/RunnerTests/RunnerTests.swift +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/app.json5 +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/resources/base/element/string.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/resources/base/media/app_icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/build-profile.json5 +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/build-profile.json5 +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/hvigorfile.ts +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/oh-package.json5 +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/pages/Index.ets +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/module.json5 +53 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/element/color.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/media/icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/en_US/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/zh_CN/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/test/Ability.test.ets +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/test/List.test.ets +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts +64 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/module.json5 +51 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/element/color.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/media/icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/profile/test_pages.json +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/hvigor/hvigor-config.json5 +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/hvigorfile.ts +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/oh-package.json5 +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/pubspec.yaml +75 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/CMakeLists.txt +108 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/CMakeLists.txt +109 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugin_registrant.cc +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugin_registrant.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugins.cmake +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/CMakeLists.txt +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/Runner.rc +121 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/flutter_window.cpp +71 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/flutter_window.h +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/main.cpp +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/resource.h +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/resources/app_icon.ico +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/runner.exe.manifest +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/utils.cpp +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/utils.h +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/win32_window.cpp +288 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/win32_window.h +102 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/lib/mmkv.dart +1052 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/mmkv.iml +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/pubspec.yaml +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/test/mmkv_test.dart +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/tool/fix_mmkv_plugin_name.rb +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/tool/mmkvpodhelper.rb +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv.iml +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/CHANGELOG.md +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/build.gradle +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle.properties +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradlew +160 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradlew.bat +90 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/settings.gradle +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/src/main/AndroidManifest.xml +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/src/main/java/com/tencent/mmkv/MMKVPlugin.java +82 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/lib/mmkv_android.dart +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/pubspec.yaml +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/.metadata +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/CHANGELOG.md +52 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/MMKVPlugin.h +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/MMKVPlugin.mm +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/flutter-bridge.h +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/flutter-bridge.mm +693 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/mmkv_ios.podspec +35 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/lib/mmkv_ios.dart +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/pubspec.yaml +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/.metadata +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/CHANGELOG.md +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/analysis_options.yaml +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/lib/mmkv_linux.dart +69 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/CMakeLists.txt +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/flutter-bridge.cpp +694 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/include/mmkv_linux/mmkv_linux_plugin.h +46 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/mmkv_linux_plugin.cc +97 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/pubspec.yaml +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/.metadata +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/CHANGELOG.md +42 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/analysis_options.yaml +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/lib/mmkv_ohos.dart +84 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/build-profile.json5 +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/hvigorfile.ts +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/index.ets +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/oh-package.json5 +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/src/main/ets/components/plugin/MMKVPlugin.ets +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/src/main/module.json5 +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/pubspec.yaml +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/CHANGELOG.md +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/README.md +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/lib/mmkv_platform_ffi.dart +363 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/lib/mmkv_platform_interface.dart +363 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/pubspec.yaml +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/.metadata +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/CHANGELOG.md +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/analysis_options.yaml +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/lib/mmkv_win32.dart +69 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/pubspec.yaml +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/CMakeLists.txt +71 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/flutter-bridge.cpp +721 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/include/mmkv_win32/mmkv_win32_plugin.h +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/mmkv_win32_plugin.cpp +88 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/AutoCleanInfo.hpp +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/MMKV.h +552 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/MMKVHandler.h +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/Resources/Info.plist +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/libMMKV.mm +1361 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.pbxproj +967 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV For App Extension.xcscheme +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV Static.xcscheme +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV.xcscheme +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKVWatchExtension.xcscheme +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/Config.xcconfig +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/AppDelegate.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/AppDelegate.m +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Base.lproj/LaunchScreen.storyboard +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Base.lproj/Main.storyboard +42 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Info.plist +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/MMKVCatalystDemo.entitlements +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/SceneDelegate.h +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/SceneDelegate.m +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/ViewController.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/ViewController.mm +85 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/main.m +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/AppDelegate.h +27 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/AppDelegate.m +135 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/DemoSwiftUsage.swift +82 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/MMKVDemo-Bridging-Header.h +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Base.lproj/LaunchScreen.storyboard +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Base.lproj/Main.storyboard +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Info.plist +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/MMKVDemo.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/testReadOnly +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/testReadOnly.crc +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/TestMMKVCpp.cpp +204 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/TestMMKVCpp.hpp +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController+TestCaseBad.h +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController+TestCaseBad.mm +200 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController.h +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController.mm +1245 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/main.m +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.pbxproj +1944 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVDemo.xcscheme +88 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVMacDemo.xcscheme +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVTodayExtensionDemo.xcscheme +116 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/WatchApp (Notification).xcscheme +106 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme +102 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/kvdemo.xcscheme +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/Info.plist +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/MMKVDemoTests.mm +554 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/MMKVPerformanceTest.mm +118 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/AppDelegate.h +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/AppDelegate.m +27 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Assets.xcassets/AppIcon.appiconset/Contents.json +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Base.lproj/Main.storyboard +718 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Info.plist +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/MMKVMacDemo.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/ViewController.h +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/ViewController.mm +352 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/main.m +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/Base.lproj/MainInterface.storyboard +45 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/Info.plist +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/MMKVTodayExtensionDemo.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/TodayViewController.h +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/TodayViewController.m +106 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Contents.json +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/ContentView.swift +71 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Info.plist +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/MMKVVisionDemoApp.swift +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Preview Content/Preview Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Assets.xcassets/AppIcon.appiconset/Contents.json +81 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Base.lproj/Interface.storyboard +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Info.plist +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Contents.json +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/ExtensionDelegate.h +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/ExtensionDelegate.mm +135 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Info.plist +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/InterfaceController.h +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/InterfaceController.m +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/NotificationController.h +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/NotificationController.m +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/PushNotificationPayload.apns +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/AppDelegate.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/AppDelegate.m +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Base.lproj/LaunchScreen.storyboard +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Base.lproj/Main.storyboard +45 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Info.plist +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/SceneDelegate.h +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/SceneDelegate.m +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/ViewController.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/ViewController.m +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/kvdemo.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/main.m +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKVManagedBuffer.h +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvCxx.cpp +152 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvCxx.h +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvHostObject.cpp +357 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvHostObject.h +66 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvLogger.h +52 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvPlatformContext.cpp +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvPlatformContext.h +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVComponentDescriptor.h +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVJSIBinder.h +55 -0
- package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVPackage.h +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/Props.cpp +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/Props.h +42 -0
- package/harmony/reactNativeMMKV/src/main/cpp/ShadowNodes.cpp +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/ShadowNodes.h +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/States.cpp +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/States.h +45 -0
- package/harmony/reactNativeMMKV/src/main/ets/Logger.ts +65 -0
- package/harmony/reactNativeMMKV/src/main/ets/MmkvCxxPackage.ts +46 -0
- package/harmony/reactNativeMMKV/src/main/ets/MmkvCxxTurboModule.ts +60 -0
- package/harmony/reactNativeMMKV/src/main/ets/MmkvPlatformContextPackage.ts +46 -0
- package/harmony/reactNativeMMKV/src/main/ets/MmkvPlatformContextTurboModule.ts +48 -0
- package/harmony/reactNativeMMKV/src/main/module.json5 +7 -0
- package/harmony/reactNativeMMKV/src/main/resources/base/element/string.json +8 -0
- package/harmony/reactNativeMMKV/src/main/resources/en_US/element/string.json +8 -0
- package/harmony/reactNativeMMKV/src/main/resources/zh_CN/element/string.json +8 -0
- package/harmony/reactNativeMMKV/ts.ts +27 -0
- package/harmony/reactNativeMMKV.har +0 -0
- package/lib/commonjs/MMKV.js +124 -0
- package/lib/commonjs/MMKV.js.map +1 -0
- package/lib/commonjs/MemoryWarningListener.js +31 -0
- package/lib/commonjs/MemoryWarningListener.js.map +1 -0
- package/lib/commonjs/MemoryWarningListener.web.js +11 -0
- package/lib/commonjs/MemoryWarningListener.web.js.map +1 -0
- package/lib/commonjs/ModuleNotFoundError.js +75 -0
- package/lib/commonjs/ModuleNotFoundError.js.map +1 -0
- package/lib/commonjs/NativeMmkv.js +53 -0
- package/lib/commonjs/NativeMmkv.js.map +1 -0
- package/lib/commonjs/NativeMmkvPlatformContext.js +22 -0
- package/lib/commonjs/NativeMmkvPlatformContext.js.map +1 -0
- package/lib/commonjs/PlatformChecker.js +14 -0
- package/lib/commonjs/PlatformChecker.js.map +1 -0
- package/lib/commonjs/Types.js +32 -0
- package/lib/commonjs/Types.js.map +1 -0
- package/lib/commonjs/createMMKV.js +43 -0
- package/lib/commonjs/createMMKV.js.map +1 -0
- package/lib/commonjs/createMMKV.mock.js +43 -0
- package/lib/commonjs/createMMKV.mock.js.map +1 -0
- package/lib/commonjs/createMMKV.web.js +110 -0
- package/lib/commonjs/createMMKV.web.js.map +1 -0
- package/lib/commonjs/createTextEncoder.js +23 -0
- package/lib/commonjs/createTextEncoder.js.map +1 -0
- package/lib/commonjs/hooks.js +198 -0
- package/lib/commonjs/hooks.js.map +1 -0
- package/lib/commonjs/index.js +40 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/MMKV.js +119 -0
- package/lib/module/MMKV.js.map +1 -0
- package/lib/module/MemoryWarningListener.js +27 -0
- package/lib/module/MemoryWarningListener.js.map +1 -0
- package/lib/module/MemoryWarningListener.web.js +6 -0
- package/lib/module/MemoryWarningListener.web.js.map +1 -0
- package/lib/module/ModuleNotFoundError.js +70 -0
- package/lib/module/ModuleNotFoundError.js.map +1 -0
- package/lib/module/NativeMmkv.js +51 -0
- package/lib/module/NativeMmkv.js.map +1 -0
- package/lib/module/NativeMmkvPlatformContext.js +18 -0
- package/lib/module/NativeMmkvPlatformContext.js.map +1 -0
- package/lib/module/PlatformChecker.js +10 -0
- package/lib/module/PlatformChecker.js.map +1 -0
- package/lib/module/Types.js +31 -0
- package/lib/module/Types.js.map +1 -0
- package/lib/module/createMMKV.js +38 -0
- package/lib/module/createMMKV.js.map +1 -0
- package/lib/module/createMMKV.mock.js +38 -0
- package/lib/module/createMMKV.mock.js.map +1 -0
- package/lib/module/createMMKV.web.js +105 -0
- package/lib/module/createMMKV.web.js.map +1 -0
- package/lib/module/createTextEncoder.js +19 -0
- package/lib/module/createTextEncoder.js.map +1 -0
- package/lib/module/hooks.js +189 -0
- package/lib/module/hooks.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/src/MMKV.d.ts +34 -0
- package/lib/typescript/src/MMKV.d.ts.map +1 -0
- package/lib/typescript/src/MemoryWarningListener.d.ts +3 -0
- package/lib/typescript/src/MemoryWarningListener.d.ts.map +1 -0
- package/lib/typescript/src/MemoryWarningListener.web.d.ts +3 -0
- package/lib/typescript/src/MemoryWarningListener.web.d.ts.map +1 -0
- package/lib/typescript/src/ModuleNotFoundError.d.ts +7 -0
- package/lib/typescript/src/ModuleNotFoundError.d.ts.map +1 -0
- package/lib/typescript/src/NativeMmkv.d.ts +91 -0
- package/lib/typescript/src/NativeMmkv.d.ts.map +1 -0
- package/lib/typescript/src/NativeMmkvPlatformContext.d.ts +20 -0
- package/lib/typescript/src/NativeMmkvPlatformContext.d.ts.map +1 -0
- package/lib/typescript/src/PlatformChecker.d.ts +2 -0
- package/lib/typescript/src/PlatformChecker.d.ts.map +1 -0
- package/lib/typescript/src/Types.d.ts +172 -0
- package/lib/typescript/src/Types.d.ts.map +1 -0
- package/lib/typescript/src/__tests__/hooks.test.d.ts +2 -0
- package/lib/typescript/src/__tests__/hooks.test.d.ts.map +1 -0
- package/lib/typescript/src/createMMKV.d.ts +3 -0
- package/lib/typescript/src/createMMKV.d.ts.map +1 -0
- package/lib/typescript/src/createMMKV.mock.d.ts +3 -0
- package/lib/typescript/src/createMMKV.mock.d.ts.map +1 -0
- package/lib/typescript/src/createMMKV.web.d.ts +3 -0
- package/lib/typescript/src/createMMKV.web.d.ts.map +1 -0
- package/lib/typescript/src/createTextEncoder.d.ts +2 -0
- package/lib/typescript/src/createTextEncoder.d.ts.map +1 -0
- package/lib/typescript/src/hooks.d.ts +86 -0
- package/lib/typescript/src/hooks.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +187 -0
- package/react-native-mmkv.podspec +38 -0
- package/react-native.config.js +20 -0
- package/src/MMKV.ts +142 -0
- package/src/MemoryWarningListener.ts +29 -0
- package/src/MemoryWarningListener.web.ts +5 -0
- package/src/ModuleNotFoundError.ts +95 -0
- package/src/NativeMmkv.ts +118 -0
- package/src/NativeMmkvPlatformContext.ts +38 -0
- package/src/PlatformChecker.ts +9 -0
- package/src/Types.ts +178 -0
- package/src/__tests__/hooks.test.tsx +89 -0
- package/src/createMMKV.mock.ts +38 -0
- package/src/createMMKV.ts +42 -0
- package/src/createMMKV.web.ts +127 -0
- package/src/createTextEncoder.ts +16 -0
- package/src/hooks.ts +247 -0
- package/src/index.ts +4 -0
|
@@ -0,0 +1,1361 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* MMKV available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2020 THL A29 Limited, a Tencent company.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the BSD 3-Clause License (the "License"); you may not use
|
|
9
|
+
* this file except in compliance with the License. You may obtain a copy of
|
|
10
|
+
* the License at
|
|
11
|
+
*
|
|
12
|
+
* https://opensource.org/licenses/BSD-3-Clause
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
#import "MMKV.h"
|
|
22
|
+
#import <MMKVCore/MMKV.h>
|
|
23
|
+
#import <MMKVCore/MMKVLog.h>
|
|
24
|
+
#import <MMKVCore/ScopedLock.hpp>
|
|
25
|
+
#import <MMKVCore/ThreadLock.h>
|
|
26
|
+
#import <MMKVCore/openssl_md5.h>
|
|
27
|
+
#import <TargetConditionals.h>
|
|
28
|
+
#import "AutoCleanInfo.hpp"
|
|
29
|
+
|
|
30
|
+
#if defined(MMKV_IOS) && !defined(MMKV_IOS_EXTENSION) && !defined(TARGET_OS_MACCATALYST)
|
|
31
|
+
#import <UIKit/UIKit.h>
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
#if __has_feature(objc_arc)
|
|
35
|
+
#error This file must be compiled with MRC. Use -fno-objc-arc flag.
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
using namespace std;
|
|
39
|
+
|
|
40
|
+
static NSMutableDictionary *g_instanceDic = nil;
|
|
41
|
+
static mmkv::ThreadLock *g_lock;
|
|
42
|
+
static id<MMKVHandler> g_callbackHandler = nil;
|
|
43
|
+
static bool g_isLogRedirecting = false;
|
|
44
|
+
static NSString *g_basePath = nil;
|
|
45
|
+
static NSString *g_groupPath = nil;
|
|
46
|
+
|
|
47
|
+
#if defined(MMKV_IOS) && !defined(MMKV_IOS_EXTENSION) && !defined(TARGET_OS_MACCATALYST)
|
|
48
|
+
static BOOL g_isRunningInAppExtension = NO;
|
|
49
|
+
#endif
|
|
50
|
+
|
|
51
|
+
static void LogHandler(mmkv::MMKVLogLevel level, const char *file, int line, const char *function, NSString *message);
|
|
52
|
+
static mmkv::MMKVRecoverStrategic ErrorHandler(const string &mmapID, mmkv::MMKVErrorType errorType);
|
|
53
|
+
static void ContentChangeHandler(const string &mmapID);
|
|
54
|
+
|
|
55
|
+
@interface MMKVNameSpace ()
|
|
56
|
+
|
|
57
|
+
- (instancetype) initWith:(NSString *)path;
|
|
58
|
+
|
|
59
|
+
@end
|
|
60
|
+
|
|
61
|
+
@implementation MMKV {
|
|
62
|
+
NSString *m_mmapID;
|
|
63
|
+
NSString *m_mmapKey;
|
|
64
|
+
mmkv::MMKV *m_mmkv;
|
|
65
|
+
uint64_t m_lastAccessTime;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
#pragma mark - init
|
|
69
|
+
|
|
70
|
+
+ (NSString *)initializeMMKV:(nullable NSString *)rootDir {
|
|
71
|
+
return [MMKV initializeMMKV:rootDir logLevel:MMKVLogInfo handler:nil];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
+ (NSString *)initializeMMKV:(nullable NSString *)rootDir logLevel:(MMKVLogLevel)logLevel {
|
|
75
|
+
return [MMKV initializeMMKV:rootDir logLevel:logLevel handler:nil];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
+ (void)initialize {
|
|
79
|
+
if (self == MMKV.class) {
|
|
80
|
+
g_instanceDic = [[NSMutableDictionary alloc] init];
|
|
81
|
+
g_lock = new mmkv::ThreadLock();
|
|
82
|
+
g_lock->initialize();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static BOOL g_hasCalledInitializeMMKV = NO;
|
|
87
|
+
|
|
88
|
+
+ (NSString *)initializeMMKV:(nullable NSString *)rootDir logLevel:(MMKVLogLevel)logLevel handler:(id<MMKVHandler>)handler {
|
|
89
|
+
if (g_hasCalledInitializeMMKV) {
|
|
90
|
+
MMKVWarning("already called +initializeMMKV before, ignore this request");
|
|
91
|
+
return [self mmkvBasePath];
|
|
92
|
+
}
|
|
93
|
+
[g_callbackHandler release];
|
|
94
|
+
g_callbackHandler = [handler retain];
|
|
95
|
+
mmkv::LogHandler logHandler = nullptr;
|
|
96
|
+
if (g_callbackHandler && [g_callbackHandler respondsToSelector:@selector(mmkvLogWithLevel:file:line:func:message:)]) {
|
|
97
|
+
g_isLogRedirecting = true;
|
|
98
|
+
logHandler = LogHandler;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (rootDir != nil) {
|
|
102
|
+
[g_basePath release];
|
|
103
|
+
g_basePath = [rootDir retain];
|
|
104
|
+
} else {
|
|
105
|
+
[self mmkvBasePath];
|
|
106
|
+
}
|
|
107
|
+
NSAssert(g_basePath.length > 0, @"MMKV not initialized properly, must not call +initializeMMKV: before -application:didFinishLaunchingWithOptions:");
|
|
108
|
+
mmkv::MMKV::initializeMMKV(g_basePath.UTF8String, (mmkv::MMKVLogLevel) logLevel, logHandler);
|
|
109
|
+
|
|
110
|
+
if ([g_callbackHandler respondsToSelector:@selector(onMMKVCRCCheckFail:)] ||
|
|
111
|
+
[g_callbackHandler respondsToSelector:@selector(onMMKVFileLengthError:)]) {
|
|
112
|
+
mmkv::MMKV::registerErrorHandler(ErrorHandler);
|
|
113
|
+
}
|
|
114
|
+
if ([g_callbackHandler respondsToSelector:@selector(onMMKVContentChange:)]) {
|
|
115
|
+
mmkv::MMKV::registerContentChangeHandler(ContentChangeHandler);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
#if defined(MMKV_IOS) && !defined(MMKV_IOS_EXTENSION) && !defined(TARGET_OS_MACCATALYST)
|
|
119
|
+
// just in case someone forget to set the MMKV_IOS_EXTENSION macro
|
|
120
|
+
if ([[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"]) {
|
|
121
|
+
g_isRunningInAppExtension = YES;
|
|
122
|
+
}
|
|
123
|
+
if (!g_isRunningInAppExtension) {
|
|
124
|
+
auto appState = [UIApplication sharedApplication].applicationState;
|
|
125
|
+
auto isInBackground = (appState == UIApplicationStateBackground);
|
|
126
|
+
mmkv::MMKV::setIsInBackground(isInBackground);
|
|
127
|
+
MMKVInfo("appState:%ld", (long) appState);
|
|
128
|
+
|
|
129
|
+
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didEnterBackground) name:UIApplicationDidEnterBackgroundNotification object:nil];
|
|
130
|
+
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil];
|
|
131
|
+
}
|
|
132
|
+
#endif
|
|
133
|
+
|
|
134
|
+
g_hasCalledInitializeMMKV = YES;
|
|
135
|
+
|
|
136
|
+
return [self mmkvBasePath];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
+ (NSString *)initializeMMKV:(nullable NSString *)rootDir groupDir:(NSString *)groupDir logLevel:(MMKVLogLevel)logLevel {
|
|
140
|
+
auto ret = [MMKV initializeMMKV:rootDir logLevel:logLevel handler:nil];
|
|
141
|
+
|
|
142
|
+
g_groupPath = [[groupDir stringByAppendingPathComponent:@"mmkv"] retain];
|
|
143
|
+
MMKVInfo("groupDir: %@", g_groupPath);
|
|
144
|
+
|
|
145
|
+
return ret;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
+ (NSString *)initializeMMKV:(nullable NSString *)rootDir groupDir:(NSString *)groupDir logLevel:(MMKVLogLevel)logLevel handler:(nullable id<MMKVHandler>)handler {
|
|
149
|
+
auto ret = [MMKV initializeMMKV:rootDir logLevel:logLevel handler:handler];
|
|
150
|
+
|
|
151
|
+
g_groupPath = [[groupDir stringByAppendingPathComponent:@"mmkv"] retain];
|
|
152
|
+
MMKVInfo("groupDir: %@", g_groupPath);
|
|
153
|
+
|
|
154
|
+
return ret;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// a generic purpose instance
|
|
158
|
+
+ (instancetype)defaultMMKV {
|
|
159
|
+
return [MMKV mmkvWithID:(@"" DEFAULT_MMAP_ID) cryptKey:nil aes256:NO rootPath:nil mode:MMKVSingleProcess expectedCapacity:0];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
+ (nullable instancetype)defaultMMKVWithCryptKey:(nullable NSData *)cryptKey {
|
|
163
|
+
return [MMKV mmkvWithID:(@"" DEFAULT_MMAP_ID) cryptKey:cryptKey aes256:NO rootPath:nil mode:MMKVSingleProcess expectedCapacity:0];
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
+ (nullable instancetype)defaultMMKVWithCryptKey:(nullable NSData *)cryptKey aes256:(BOOL)aes256 {
|
|
167
|
+
return [MMKV mmkvWithID:(@"" DEFAULT_MMAP_ID) cryptKey:cryptKey aes256:aes256 rootPath:nil mode:MMKVSingleProcess expectedCapacity:0];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// any unique ID (com.tencent.xin.pay, etc)
|
|
171
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID {
|
|
172
|
+
return [MMKV mmkvWithID:mmapID cryptKey:nil aes256:NO rootPath:nil mode:MMKVSingleProcess expectedCapacity:0];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID expectedCapacity:(size_t)expectedCapacity {
|
|
176
|
+
return [MMKV mmkvWithID:mmapID
|
|
177
|
+
cryptKey:nil
|
|
178
|
+
aes256:NO
|
|
179
|
+
rootPath:nil
|
|
180
|
+
mode:MMKVSingleProcess
|
|
181
|
+
expectedCapacity:expectedCapacity];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID mode:(MMKVMode)mode {
|
|
185
|
+
auto rootPath = (mode & MMKVSingleProcess) ? nil : g_groupPath;
|
|
186
|
+
return [MMKV mmkvWithID:mmapID cryptKey:nil aes256:NO rootPath:rootPath mode:mode expectedCapacity:0];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey {
|
|
190
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:nil mode:MMKVSingleProcess expectedCapacity:0];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey aes256:(BOOL)aes256 {
|
|
194
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:nil mode:MMKVSingleProcess expectedCapacity:0];
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey expectedCapacity:(size_t)expectedCapacity {
|
|
198
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:nil mode:MMKVSingleProcess expectedCapacity:expectedCapacity];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey aes256:(BOOL)aes256 expectedCapacity:(size_t)expectedCapacity {
|
|
202
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:nil mode:MMKVSingleProcess expectedCapacity:expectedCapacity];
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(nullable NSData *)cryptKey mode:(MMKVMode)mode {
|
|
206
|
+
auto rootPath = (mode & MMKVSingleProcess) ? nil : g_groupPath;
|
|
207
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:rootPath mode:mode expectedCapacity:0];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(nullable NSData *)cryptKey aes256:(BOOL)aes256 mode:(MMKVMode)mode {
|
|
211
|
+
auto rootPath = (mode & MMKVSingleProcess) ? nil : g_groupPath;
|
|
212
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:rootPath mode:mode expectedCapacity:0];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID rootPath:(nullable NSString *)rootPath {
|
|
216
|
+
return [MMKV mmkvWithID:mmapID cryptKey:nil aes256:NO rootPath:rootPath mode:MMKVSingleProcess expectedCapacity:0];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID rootPath:(nullable NSString *)rootPath expectedCapacity:(size_t)expectedCapacity {
|
|
220
|
+
return [MMKV mmkvWithID:mmapID cryptKey:nil aes256:NO rootPath:rootPath mode:MMKVSingleProcess expectedCapacity:expectedCapacity];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey rootPath:(nullable NSString *)rootPath {
|
|
224
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:rootPath mode:MMKVSingleProcess expectedCapacity:0];
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey aes256:(BOOL)aes256 rootPath:(nullable NSString *)rootPath {
|
|
228
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:rootPath mode:MMKVSingleProcess expectedCapacity:0];
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(nullable NSData *)cryptKey rootPath:(nullable NSString *)rootPath expectedCapacity:(size_t)expectedCapacity {
|
|
232
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:rootPath mode:MMKVSingleProcess expectedCapacity:expectedCapacity];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey rootPath:(nullable NSString *)rootPath mode:(MMKVMode)mode {
|
|
236
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:rootPath mode:mode expectedCapacity:0];
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey rootPath:(nullable NSString *)rootPath mode:(MMKVMode)mode expectedCapacity:(size_t)expectedCapacity {
|
|
240
|
+
return [MMKV mmkvWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:rootPath mode:mode expectedCapacity:expectedCapacity];
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
+ (instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey aes256:(BOOL)aes256 rootPath:(nullable NSString *)rootPath mode:(MMKVMode)mode expectedCapacity:(size_t)expectedCapacity {
|
|
244
|
+
NSAssert(g_hasCalledInitializeMMKV, @"MMKV not initialized properly, must call +initializeMMKV: in main thread before calling any other MMKV methods");
|
|
245
|
+
if (mode & MMKVMultiProcess) {
|
|
246
|
+
if (!rootPath) {
|
|
247
|
+
rootPath = g_groupPath;
|
|
248
|
+
}
|
|
249
|
+
if (!rootPath) {
|
|
250
|
+
MMKVError("Getting a multi-process MMKV [%@] without setting groupDir makes no sense", mmapID);
|
|
251
|
+
MMKV_ASSERT(0);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return [self doGetWithID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:rootPath mode:mode expectedCapacity:expectedCapacity];
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
+ (instancetype)doGetWithID:(NSString *)mmapID cryptKey:(NSData *)cryptKey aes256:(BOOL)aes256 rootPath:(nullable NSString *)rootPath mode:(MMKVMode)mode expectedCapacity:(size_t)expectedCapacity {
|
|
258
|
+
if (mmapID.length <= 0) {
|
|
259
|
+
return nil;
|
|
260
|
+
}
|
|
261
|
+
SCOPED_LOCK(g_lock);
|
|
262
|
+
|
|
263
|
+
NSString *kvKey = [MMKV mmapKeyWithMMapID:mmapID rootPath:rootPath];
|
|
264
|
+
MMKV *kv = [g_instanceDic objectForKey:kvKey];
|
|
265
|
+
if (kv == nil) {
|
|
266
|
+
kv = [[MMKV alloc] initWithMMapID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:rootPath mode:mode expectedCapacity:expectedCapacity];
|
|
267
|
+
if (!kv->m_mmkv) {
|
|
268
|
+
[kv release];
|
|
269
|
+
return nil;
|
|
270
|
+
}
|
|
271
|
+
kv->m_mmapKey = kvKey;
|
|
272
|
+
[g_instanceDic setObject:kv forKey:kvKey];
|
|
273
|
+
[kv release];
|
|
274
|
+
}
|
|
275
|
+
kv->m_lastAccessTime = llround([NSDate timeIntervalSinceReferenceDate] * 1000);
|
|
276
|
+
return kv;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
- (instancetype)initWithMMapID:(NSString *)mmapID cryptKey:(NSData *)cryptKey aes256:(BOOL)aes256 rootPath:(NSString *)rootPath mode:(MMKVMode)mode expectedCapacity:(size_t)expectedCapacity {
|
|
280
|
+
if (self = [super init]) {
|
|
281
|
+
string pathTmp;
|
|
282
|
+
if (rootPath.length > 0) {
|
|
283
|
+
pathTmp = rootPath.UTF8String;
|
|
284
|
+
}
|
|
285
|
+
string cryptKeyTmp;
|
|
286
|
+
if (cryptKey.length > 0) {
|
|
287
|
+
cryptKeyTmp = string((char *) cryptKey.bytes, cryptKey.length);
|
|
288
|
+
}
|
|
289
|
+
string *rootPathPtr = pathTmp.empty() ? nullptr : &pathTmp;
|
|
290
|
+
string *cryptKeyPtr = cryptKeyTmp.empty() ? nullptr : &cryptKeyTmp;
|
|
291
|
+
m_mmkv = mmkv::MMKV::mmkvWithID(mmapID.UTF8String, (mmkv::MMKVMode) mode, cryptKeyPtr, rootPathPtr, expectedCapacity, aes256);
|
|
292
|
+
if (!m_mmkv) {
|
|
293
|
+
return self;
|
|
294
|
+
}
|
|
295
|
+
m_mmapID = [[NSString alloc] initWithUTF8String:m_mmkv->mmapID().c_str()];
|
|
296
|
+
|
|
297
|
+
#if defined(MMKV_IOS) && !defined(MMKV_IOS_EXTENSION) && !defined(TARGET_OS_MACCATALYST)
|
|
298
|
+
if (!g_isRunningInAppExtension) {
|
|
299
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
300
|
+
selector:@selector(onMemoryWarning)
|
|
301
|
+
name:UIApplicationDidReceiveMemoryWarningNotification
|
|
302
|
+
object:nil];
|
|
303
|
+
}
|
|
304
|
+
#endif
|
|
305
|
+
}
|
|
306
|
+
return self;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
- (void)dealloc {
|
|
310
|
+
[self clearMemoryCache];
|
|
311
|
+
|
|
312
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
313
|
+
|
|
314
|
+
MMKVInfo("dealloc %@", m_mmapID);
|
|
315
|
+
[m_mmapID release];
|
|
316
|
+
|
|
317
|
+
if (m_mmkv) {
|
|
318
|
+
m_mmkv->close();
|
|
319
|
+
m_mmkv = nullptr;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
[super dealloc];
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
- (NSString *)mmapID {
|
|
326
|
+
return m_mmapID;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
#pragma mark - Application state
|
|
330
|
+
|
|
331
|
+
#if defined(MMKV_IOS) && !defined(MMKV_IOS_EXTENSION) && !defined(TARGET_OS_MACCATALYST)
|
|
332
|
+
- (void)onMemoryWarning {
|
|
333
|
+
MMKVInfo("cleaning on memory warning %@", m_mmapID);
|
|
334
|
+
|
|
335
|
+
[self clearMemoryCache];
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
+ (void)didEnterBackground {
|
|
339
|
+
mmkv::MMKV::setIsInBackground(true);
|
|
340
|
+
MMKVInfo("isInBackground:%d", true);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
+ (void)didBecomeActive {
|
|
344
|
+
mmkv::MMKV::setIsInBackground(false);
|
|
345
|
+
MMKVInfo("isInBackground:%d", false);
|
|
346
|
+
}
|
|
347
|
+
#endif
|
|
348
|
+
|
|
349
|
+
- (void)clearAll {
|
|
350
|
+
m_mmkv->clearAll();
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
- (void)clearAllWithKeepingSpace {
|
|
354
|
+
m_mmkv->clearAll(true);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
- (void)clearMemoryCache {
|
|
358
|
+
if (m_mmkv) {
|
|
359
|
+
m_mmkv->clearMemoryCache();
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
- (void)close {
|
|
364
|
+
SCOPED_LOCK(g_lock);
|
|
365
|
+
MMKVInfo("closing %@", m_mmapID);
|
|
366
|
+
|
|
367
|
+
[g_instanceDic removeObjectForKey:m_mmapKey];
|
|
368
|
+
|
|
369
|
+
if (self.retainCount > 1) {
|
|
370
|
+
MMKVWarning("There's still reference on this kv: %@", m_mmapID);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
- (void)trim {
|
|
375
|
+
m_mmkv->trim();
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
- (size_t)importFrom:(MMKV *)src {
|
|
379
|
+
if (!src) {
|
|
380
|
+
return 0;
|
|
381
|
+
}
|
|
382
|
+
return m_mmkv->importFrom(src->m_mmkv);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
#pragma mark - encryption & decryption
|
|
386
|
+
|
|
387
|
+
#ifndef MMKV_DISABLE_CRYPT
|
|
388
|
+
|
|
389
|
+
- (nullable NSData *)cryptKey {
|
|
390
|
+
auto str = m_mmkv->cryptKey();
|
|
391
|
+
if (str.length() > 0) {
|
|
392
|
+
return [NSData dataWithBytes:str.data() length:str.length()];
|
|
393
|
+
}
|
|
394
|
+
return nil;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
- (BOOL)reKey:(nullable NSData *)newKey {
|
|
398
|
+
return [self reKey:newKey aes256:NO];
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
- (BOOL)reKey:(nullable NSData *)newKey aes256:(BOOL)aes256 {
|
|
402
|
+
string key;
|
|
403
|
+
if (newKey.length > 0) {
|
|
404
|
+
key = string((char *) newKey.bytes, newKey.length);
|
|
405
|
+
}
|
|
406
|
+
return m_mmkv->reKey(key, aes256);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
- (void)checkReSetCryptKey:(nullable NSData *)cryptKey {
|
|
410
|
+
[self checkReSetCryptKey:cryptKey aes256:NO];
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
- (void)checkReSetCryptKey:(nullable NSData *)cryptKey aes256:(BOOL)aes256 {
|
|
414
|
+
if (cryptKey.length > 0) {
|
|
415
|
+
string key = string((char *) cryptKey.bytes, cryptKey.length);
|
|
416
|
+
m_mmkv->checkReSetCryptKey(&key, aes256);
|
|
417
|
+
} else {
|
|
418
|
+
m_mmkv->checkReSetCryptKey(nullptr, aes256);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
#else
|
|
423
|
+
|
|
424
|
+
- (nullable NSData *)cryptKey {
|
|
425
|
+
return nil;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
- (BOOL)reKey:(nullable NSData *)newKey {
|
|
429
|
+
return NO;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
- (BOOL)reKey:(nullable NSData *)newKey aes256:(BOOL)aes256 {
|
|
433
|
+
return NO;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
- (void)checkReSetCryptKey:(nullable NSData *)cryptKey {
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
- (void)checkReSetCryptKey:(nullable NSData *)cryptKey aes256:(BOOL)aes256 {
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
#endif // MMKV_DISABLE_CRYPT
|
|
443
|
+
|
|
444
|
+
#pragma mark - set & get
|
|
445
|
+
|
|
446
|
+
- (BOOL)setObject:(nullable NSObject<NSCoding> *)object forKey:(NSString *)key {
|
|
447
|
+
return m_mmkv->set(object, key);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
- (BOOL)setObject:(nullable NSObject<NSCoding> *)object forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
451
|
+
return m_mmkv->set(object, key, seconds);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
- (BOOL)setBool:(BOOL)value forKey:(NSString *)key {
|
|
455
|
+
return m_mmkv->set((bool) value, key);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
- (BOOL)setBool:(BOOL)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
459
|
+
return m_mmkv->set((bool) value, key, seconds);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
- (BOOL)setInt32:(int32_t)value forKey:(NSString *)key {
|
|
463
|
+
return m_mmkv->set(value, key);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
- (BOOL)setInt32:(int32_t)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
467
|
+
return m_mmkv->set(value, key, seconds);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
- (BOOL)setUInt32:(uint32_t)value forKey:(NSString *)key {
|
|
471
|
+
return m_mmkv->set(value, key);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
- (BOOL)setUInt32:(uint32_t)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
475
|
+
return m_mmkv->set(value, key, seconds);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
- (BOOL)setInt64:(int64_t)value forKey:(NSString *)key {
|
|
479
|
+
return m_mmkv->set(value, key);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
- (BOOL)setInt64:(int64_t)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
483
|
+
return m_mmkv->set(value, key, seconds);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
- (BOOL)setUInt64:(uint64_t)value forKey:(NSString *)key {
|
|
487
|
+
return m_mmkv->set(value, key);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
- (BOOL)setUInt64:(uint64_t)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
491
|
+
return m_mmkv->set(value, key, seconds);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
- (BOOL)setFloat:(float)value forKey:(NSString *)key {
|
|
495
|
+
return m_mmkv->set(value, key);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
- (BOOL)setFloat:(float)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
499
|
+
return m_mmkv->set(value, key, seconds);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
- (BOOL)setDouble:(double)value forKey:(NSString *)key {
|
|
503
|
+
return m_mmkv->set(value, key);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
- (BOOL)setDouble:(double)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
507
|
+
return m_mmkv->set(value, key, seconds);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
- (BOOL)setString:(NSString *)value forKey:(NSString *)key {
|
|
511
|
+
return [self setObject:value forKey:key];
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
- (BOOL)setString:(NSString *)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
515
|
+
return [self setObject:value forKey:key expireDuration:seconds];
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
- (BOOL)setDate:(NSDate *)value forKey:(NSString *)key {
|
|
519
|
+
return [self setObject:value forKey:key];
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
- (BOOL)setDate:(NSDate *)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
523
|
+
return [self setObject:value forKey:key expireDuration:seconds];
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
- (BOOL)setData:(NSData *)value forKey:(NSString *)key {
|
|
527
|
+
return [self setObject:value forKey:key];
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
- (BOOL)setData:(NSData *)value forKey:(NSString *)key expireDuration:(uint32_t)seconds {
|
|
531
|
+
return [self setObject:value forKey:key expireDuration:seconds];
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
- (id)getObjectOfClass:(Class)cls forKey:(NSString *)key {
|
|
535
|
+
return m_mmkv->getObject(key, cls);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
- (BOOL)getBoolForKey:(NSString *)key {
|
|
539
|
+
return [self getBoolForKey:key defaultValue:FALSE hasValue:nil];
|
|
540
|
+
}
|
|
541
|
+
- (BOOL)getBoolForKey:(NSString *)key defaultValue:(BOOL)defaultValue {
|
|
542
|
+
return [self getBoolForKey:key defaultValue:defaultValue hasValue:nil];
|
|
543
|
+
}
|
|
544
|
+
- (BOOL)getBoolForKey:(NSString *)key defaultValue:(BOOL)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
545
|
+
return m_mmkv->getBool(key, defaultValue, (bool *) hasValue);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
- (int32_t)getInt32ForKey:(NSString *)key {
|
|
549
|
+
return [self getInt32ForKey:key defaultValue:0 hasValue:nil];
|
|
550
|
+
}
|
|
551
|
+
- (int32_t)getInt32ForKey:(NSString *)key defaultValue:(int32_t)defaultValue {
|
|
552
|
+
return [self getInt32ForKey:key defaultValue:defaultValue hasValue:nil];
|
|
553
|
+
}
|
|
554
|
+
- (int32_t)getInt32ForKey:(NSString *)key defaultValue:(int32_t)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
555
|
+
return m_mmkv->getInt32(key, defaultValue, (bool *) hasValue);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
- (uint32_t)getUInt32ForKey:(NSString *)key {
|
|
559
|
+
return [self getUInt32ForKey:key defaultValue:0 hasValue:nil];
|
|
560
|
+
}
|
|
561
|
+
- (uint32_t)getUInt32ForKey:(NSString *)key defaultValue:(uint32_t)defaultValue {
|
|
562
|
+
return [self getUInt32ForKey:key defaultValue:defaultValue hasValue:nil];
|
|
563
|
+
}
|
|
564
|
+
- (uint32_t)getUInt32ForKey:(NSString *)key defaultValue:(uint32_t)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
565
|
+
return m_mmkv->getUInt32(key, defaultValue, (bool *) hasValue);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
- (int64_t)getInt64ForKey:(NSString *)key {
|
|
569
|
+
return [self getInt64ForKey:key defaultValue:0 hasValue:nil];
|
|
570
|
+
}
|
|
571
|
+
- (int64_t)getInt64ForKey:(NSString *)key defaultValue:(int64_t)defaultValue {
|
|
572
|
+
return [self getInt64ForKey:key defaultValue:defaultValue hasValue:nil];
|
|
573
|
+
}
|
|
574
|
+
- (int64_t)getInt64ForKey:(NSString *)key defaultValue:(int64_t)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
575
|
+
return m_mmkv->getInt64(key, defaultValue, (bool *) hasValue);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
- (uint64_t)getUInt64ForKey:(NSString *)key {
|
|
579
|
+
return [self getUInt64ForKey:key defaultValue:0 hasValue:nil];
|
|
580
|
+
}
|
|
581
|
+
- (uint64_t)getUInt64ForKey:(NSString *)key defaultValue:(uint64_t)defaultValue {
|
|
582
|
+
return [self getUInt64ForKey:key defaultValue:defaultValue hasValue:nil];
|
|
583
|
+
}
|
|
584
|
+
- (uint64_t)getUInt64ForKey:(NSString *)key defaultValue:(uint64_t)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
585
|
+
return m_mmkv->getUInt64(key, defaultValue, (bool *) hasValue);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
- (float)getFloatForKey:(NSString *)key {
|
|
589
|
+
return [self getFloatForKey:key defaultValue:0 hasValue:nil];
|
|
590
|
+
}
|
|
591
|
+
- (float)getFloatForKey:(NSString *)key defaultValue:(float)defaultValue {
|
|
592
|
+
return [self getFloatForKey:key defaultValue:defaultValue hasValue:nil];
|
|
593
|
+
}
|
|
594
|
+
- (float)getFloatForKey:(NSString *)key defaultValue:(float)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
595
|
+
return m_mmkv->getFloat(key, defaultValue, (bool *) hasValue);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
- (double)getDoubleForKey:(NSString *)key {
|
|
599
|
+
return [self getDoubleForKey:key defaultValue:0 hasValue:nil];
|
|
600
|
+
}
|
|
601
|
+
- (double)getDoubleForKey:(NSString *)key defaultValue:(double)defaultValue {
|
|
602
|
+
return [self getDoubleForKey:key defaultValue:defaultValue hasValue:nil];
|
|
603
|
+
}
|
|
604
|
+
- (double)getDoubleForKey:(NSString *)key defaultValue:(double)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
605
|
+
return m_mmkv->getDouble(key, defaultValue, (bool *) hasValue);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
- (nullable NSString *)getStringForKey:(NSString *)key {
|
|
609
|
+
return [self getStringForKey:key defaultValue:nil hasValue:nil];
|
|
610
|
+
}
|
|
611
|
+
- (nullable NSString *)getStringForKey:(NSString *)key defaultValue:(nullable NSString *)defaultValue {
|
|
612
|
+
return [self getStringForKey:key defaultValue:defaultValue hasValue:nil];
|
|
613
|
+
}
|
|
614
|
+
- (nullable NSString *)getStringForKey:(NSString *)key defaultValue:(nullable NSString *)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
615
|
+
if (key.length <= 0) {
|
|
616
|
+
return defaultValue;
|
|
617
|
+
}
|
|
618
|
+
NSString *valueString = [self getObjectOfClass:NSString.class forKey:key];
|
|
619
|
+
if (!valueString) {
|
|
620
|
+
if (hasValue != nil) {
|
|
621
|
+
*hasValue = false;
|
|
622
|
+
}
|
|
623
|
+
valueString = defaultValue;
|
|
624
|
+
}
|
|
625
|
+
return valueString;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
- (nullable NSDate *)getDateForKey:(NSString *)key {
|
|
629
|
+
return [self getDateForKey:key defaultValue:nil hasValue:nil];
|
|
630
|
+
}
|
|
631
|
+
- (nullable NSDate *)getDateForKey:(NSString *)key defaultValue:(nullable NSDate *)defaultValue {
|
|
632
|
+
return [self getDateForKey:key defaultValue:defaultValue hasValue:nil];
|
|
633
|
+
}
|
|
634
|
+
- (nullable NSDate *)getDateForKey:(NSString *)key defaultValue:(nullable NSDate *)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
635
|
+
if (key.length <= 0) {
|
|
636
|
+
return defaultValue;
|
|
637
|
+
}
|
|
638
|
+
NSDate *valueDate = [self getObjectOfClass:NSDate.class forKey:key];
|
|
639
|
+
if (!valueDate) {
|
|
640
|
+
if (hasValue != nil) {
|
|
641
|
+
*hasValue = false;
|
|
642
|
+
}
|
|
643
|
+
valueDate = defaultValue;
|
|
644
|
+
}
|
|
645
|
+
return valueDate;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
- (nullable NSData *)getDataForKey:(NSString *)key {
|
|
649
|
+
return [self getDataForKey:key defaultValue:nil];
|
|
650
|
+
}
|
|
651
|
+
- (nullable NSData *)getDataForKey:(NSString *)key defaultValue:(nullable NSData *)defaultValue {
|
|
652
|
+
return [self getDataForKey:key defaultValue:defaultValue hasValue:nil];
|
|
653
|
+
}
|
|
654
|
+
- (nullable NSData *)getDataForKey:(NSString *)key defaultValue:(nullable NSData *)defaultValue hasValue:(MMKV_OUT BOOL *)hasValue {
|
|
655
|
+
if (key.length <= 0) {
|
|
656
|
+
return defaultValue;
|
|
657
|
+
}
|
|
658
|
+
NSData *valueData = [self getObjectOfClass:NSData.class forKey:key];
|
|
659
|
+
if (!valueData) {
|
|
660
|
+
if (hasValue != nil) {
|
|
661
|
+
*hasValue = false;
|
|
662
|
+
}
|
|
663
|
+
valueData = defaultValue;
|
|
664
|
+
}
|
|
665
|
+
return valueData;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
- (size_t)getValueSizeForKey:(NSString *)key actualSize:(BOOL)actualSize {
|
|
669
|
+
return m_mmkv->getValueSize(key, actualSize);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
- (int32_t)writeValueForKey:(NSString *)key toBuffer:(NSMutableData *)buffer {
|
|
673
|
+
return m_mmkv->writeValueToBuffer(key, buffer.mutableBytes, static_cast<int32_t>(buffer.length));
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
#pragma mark - enumerate
|
|
677
|
+
|
|
678
|
+
- (BOOL)containsKey:(NSString *)key {
|
|
679
|
+
return m_mmkv->containsKey(key);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
- (size_t)count {
|
|
683
|
+
return m_mmkv->count();
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
- (size_t)totalSize {
|
|
687
|
+
return m_mmkv->totalSize();
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
- (size_t)actualSize {
|
|
691
|
+
return m_mmkv->actualSize();
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
+ (size_t)pageSize {
|
|
695
|
+
return mmkv::DEFAULT_MMAP_SIZE;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
+ (NSString *)version {
|
|
699
|
+
return [NSString stringWithCString:MMKV_VERSION encoding:NSASCIIStringEncoding];
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
- (void)enumerateKeys:(void (^)(NSString *key, BOOL *stop))block {
|
|
703
|
+
m_mmkv->enumerateKeys(block);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
- (NSArray *)allKeys {
|
|
707
|
+
return m_mmkv->allKeysObjC();
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
- (size_t)countNonExpiredKeys {
|
|
711
|
+
return m_mmkv->count(true);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
- (NSArray *)allNonExpiredKeys {
|
|
715
|
+
return m_mmkv->allKeysObjC(true);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
- (BOOL)enableAutoKeyExpire:(uint32_t)expiredInSeconds {
|
|
719
|
+
if (m_mmkv->isCompareBeforeSetEnabled()) {
|
|
720
|
+
MMKVWarning("enableCompareBeforeSet will be invalid when Expiration is on");
|
|
721
|
+
#if DEBUG
|
|
722
|
+
MMKV_ASSERT(0);
|
|
723
|
+
#endif
|
|
724
|
+
}
|
|
725
|
+
return m_mmkv->enableAutoKeyExpire(expiredInSeconds);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
- (BOOL)disableAutoKeyExpire {
|
|
729
|
+
return m_mmkv->disableAutoKeyExpire();
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
- (BOOL)enableCompareBeforeSet {
|
|
733
|
+
if (m_mmkv->isExpirationEnabled()) {
|
|
734
|
+
MMKVWarning("enableCompareBeforeSet is invalid when Expiration is on");
|
|
735
|
+
#if DEBUG
|
|
736
|
+
MMKV_ASSERT(0);
|
|
737
|
+
#endif
|
|
738
|
+
return NO;
|
|
739
|
+
}
|
|
740
|
+
if (m_mmkv->isEncryptionEnabled()) {
|
|
741
|
+
MMKVWarning("enableCompareBeforeSet is invalid when key encryption is on");
|
|
742
|
+
#if DEBUG
|
|
743
|
+
MMKV_ASSERT(0);
|
|
744
|
+
#endif
|
|
745
|
+
return NO;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
return m_mmkv->enableCompareBeforeSet();
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
- (BOOL)disableCompareBeforeSet {
|
|
752
|
+
return m_mmkv->disableCompareBeforeSet();
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
- (void)removeValueForKey:(NSString *)key {
|
|
756
|
+
m_mmkv->removeValueForKey(key);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
- (void)removeValuesForKeys:(NSArray *)arrKeys {
|
|
760
|
+
m_mmkv->removeValuesForKeys(arrKeys);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
- (void)sync {
|
|
764
|
+
m_mmkv->sync(mmkv::MMKV_SYNC);
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
- (void)async {
|
|
768
|
+
m_mmkv->sync(mmkv::MMKV_ASYNC);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
- (void)checkContentChanged {
|
|
772
|
+
m_mmkv->checkContentChanged();
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
- (BOOL)isMultiProcess {
|
|
776
|
+
return m_mmkv->isMultiProcess();
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
- (BOOL)isReadOnly {
|
|
780
|
+
return m_mmkv->isReadOnly();
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
- (mmkv::MMKV *)cppInstance {
|
|
784
|
+
return m_mmkv;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
+ (void)onAppTerminate {
|
|
788
|
+
g_lock->lock();
|
|
789
|
+
|
|
790
|
+
// make sure no further call will go into m_mmkv
|
|
791
|
+
[g_instanceDic enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, MMKV *_Nonnull mmkv, BOOL *_Nonnull stop) {
|
|
792
|
+
mmkv->m_mmkv = nullptr;
|
|
793
|
+
}];
|
|
794
|
+
[g_instanceDic release];
|
|
795
|
+
g_instanceDic = nil;
|
|
796
|
+
|
|
797
|
+
[g_basePath release];
|
|
798
|
+
g_basePath = nil;
|
|
799
|
+
|
|
800
|
+
[g_groupPath release];
|
|
801
|
+
g_groupPath = nil;
|
|
802
|
+
|
|
803
|
+
mmkv::MMKV::onExit();
|
|
804
|
+
|
|
805
|
+
g_lock->unlock();
|
|
806
|
+
delete g_lock;
|
|
807
|
+
g_lock = nullptr;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
static bool g_isAutoCleanUpEnabled = false;
|
|
811
|
+
static uint32_t g_maxIdleMS = 0;
|
|
812
|
+
constexpr int DoCleanUpDurationMS = 2 * 1000;
|
|
813
|
+
static dispatch_source_t g_autoCleanUpTimer = nullptr;
|
|
814
|
+
static AutoCleanInfoQueue_t g_cleanQueue = {};
|
|
815
|
+
|
|
816
|
+
+ (void)enableAutoCleanUp:(uint32_t)maxIdleMinutes {
|
|
817
|
+
MMKVInfo("enable auto clean up with maxIdleMinutes:%zu", maxIdleMinutes);
|
|
818
|
+
SCOPED_LOCK(g_lock);
|
|
819
|
+
|
|
820
|
+
g_isAutoCleanUpEnabled = true;
|
|
821
|
+
g_maxIdleMS = maxIdleMinutes * 60 * 1000;
|
|
822
|
+
|
|
823
|
+
if (!g_autoCleanUpTimer) {
|
|
824
|
+
g_autoCleanUpTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0));
|
|
825
|
+
dispatch_source_set_event_handler(g_autoCleanUpTimer, ^{
|
|
826
|
+
[MMKV tryAutoCleanUpInstances];
|
|
827
|
+
});
|
|
828
|
+
} else {
|
|
829
|
+
dispatch_suspend(g_autoCleanUpTimer);
|
|
830
|
+
}
|
|
831
|
+
dispatch_source_set_timer(g_autoCleanUpTimer,
|
|
832
|
+
dispatch_time(DISPATCH_TIME_NOW, g_maxIdleMS * NSEC_PER_MSEC),
|
|
833
|
+
g_maxIdleMS * NSEC_PER_MSEC,
|
|
834
|
+
0);
|
|
835
|
+
dispatch_resume(g_autoCleanUpTimer);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
+ (void)disableAutoCleanUp {
|
|
839
|
+
MMKVInfo("disable auto clean up");
|
|
840
|
+
SCOPED_LOCK(g_lock);
|
|
841
|
+
|
|
842
|
+
g_isAutoCleanUpEnabled = false;
|
|
843
|
+
g_maxIdleMS = 0;
|
|
844
|
+
|
|
845
|
+
if (g_autoCleanUpTimer) {
|
|
846
|
+
dispatch_source_cancel(g_autoCleanUpTimer);
|
|
847
|
+
dispatch_release(g_autoCleanUpTimer);
|
|
848
|
+
g_autoCleanUpTimer = nullptr;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/// clean up mmkv instance that not been access lately
|
|
853
|
+
/// There are two phases of auto clean:
|
|
854
|
+
/// 1. check-cleanup phase with longer duration: CleanUpDurationMS
|
|
855
|
+
/// 2. do-cleanup phase with faster duration: DoCleanUpDurationSecends
|
|
856
|
+
+ (void)tryAutoCleanUpInstances {
|
|
857
|
+
SCOPED_LOCK(g_lock);
|
|
858
|
+
|
|
859
|
+
#if defined(MMKV_IOS) && !defined(TARGET_OS_MACCATALYST)
|
|
860
|
+
if (mmkv::MMKV::isInBackground()) {
|
|
861
|
+
MMKVInfo("don't cleanup in background, might just wakeup from suspend");
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
#endif
|
|
865
|
+
|
|
866
|
+
const uint64_t now = llround([NSDate timeIntervalSinceReferenceDate] * 1000);
|
|
867
|
+
|
|
868
|
+
// mark that we were once in do-cleanup phase and maybe needs reset timer
|
|
869
|
+
bool inDoCleanupPhase = !g_cleanQueue.empty();
|
|
870
|
+
while (!g_cleanQueue.empty()) {
|
|
871
|
+
auto &info = g_cleanQueue.top();
|
|
872
|
+
auto mmkv = (MMKV *) [g_instanceDic objectForKey:info.m_key];
|
|
873
|
+
if (mmkv) {
|
|
874
|
+
if (mmkv->m_mmkv->try_lock_thread()) {
|
|
875
|
+
// check m_lastAccessTime again
|
|
876
|
+
if (mmkv->m_lastAccessTime + g_maxIdleMS <= now && mmkv.retainCount == 1) {
|
|
877
|
+
// clean one at a time, prevent from holding g_lock for too long
|
|
878
|
+
@autoreleasepool {
|
|
879
|
+
MMKVInfo("auto cleanup mmkv [%@], m_time: %llu", info.m_key, info.m_time);
|
|
880
|
+
[g_instanceDic removeObjectForKey:info.m_key];
|
|
881
|
+
g_cleanQueue.pop();
|
|
882
|
+
// enumerate & check again if hit the bottom
|
|
883
|
+
if (g_cleanQueue.empty()) {
|
|
884
|
+
break;
|
|
885
|
+
}
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
MMKVInfo("ignore auto cleanup mmkv [%@], m_lastAccessTime: %llu", info.m_key, mmkv->m_lastAccessTime);
|
|
890
|
+
mmkv->m_mmkv->unlock_thread();
|
|
891
|
+
}
|
|
892
|
+
// if we reach here, it's must have been access by someone, ignore it
|
|
893
|
+
g_cleanQueue.pop();
|
|
894
|
+
} else {
|
|
895
|
+
// someone else has closed it
|
|
896
|
+
MMKVInfo("ignore already closed mmkv [%@]", info.m_key);
|
|
897
|
+
g_cleanQueue.pop();
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
[g_instanceDic enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL *_Nonnull stop) {
|
|
902
|
+
auto mmkv = (MMKV *) obj;
|
|
903
|
+
if (mmkv->m_lastAccessTime + g_maxIdleMS <= now && mmkv.retainCount == 1) {
|
|
904
|
+
MMKVInfo("adding to cleanup queue mmkv [%@], m_lastAccessTime: %llu", key, mmkv->m_lastAccessTime);
|
|
905
|
+
g_cleanQueue.emplace((NSString *) key, mmkv->m_lastAccessTime);
|
|
906
|
+
}
|
|
907
|
+
}];
|
|
908
|
+
|
|
909
|
+
if (g_autoCleanUpTimer) {
|
|
910
|
+
if (!inDoCleanupPhase && !g_cleanQueue.empty()) {
|
|
911
|
+
MMKVInfo("switch to do-cleanup phase with faster duration");
|
|
912
|
+
dispatch_source_set_timer(g_autoCleanUpTimer,
|
|
913
|
+
dispatch_time(DISPATCH_TIME_NOW, DoCleanUpDurationMS * NSEC_PER_MSEC),
|
|
914
|
+
DoCleanUpDurationMS * NSEC_PER_MSEC,
|
|
915
|
+
60 * NSEC_PER_SEC);
|
|
916
|
+
} else if (inDoCleanupPhase && g_cleanQueue.empty()) {
|
|
917
|
+
MMKVInfo("switch back to check-cleanup phase with longer duration");
|
|
918
|
+
dispatch_source_set_timer(g_autoCleanUpTimer,
|
|
919
|
+
dispatch_time(DISPATCH_TIME_NOW, g_maxIdleMS * NSEC_PER_MSEC),
|
|
920
|
+
g_maxIdleMS * NSEC_PER_MSEC,
|
|
921
|
+
60 * NSEC_PER_SEC);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
+ (NSString *)mmkvBasePath {
|
|
927
|
+
if (g_basePath.length > 0) {
|
|
928
|
+
return g_basePath;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
#if TARGET_OS_TV
|
|
932
|
+
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
|
933
|
+
#else
|
|
934
|
+
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
|
935
|
+
#endif
|
|
936
|
+
NSString *documentPath = (NSString *) [paths firstObject];
|
|
937
|
+
if ([documentPath length] > 0) {
|
|
938
|
+
g_basePath = [[documentPath stringByAppendingPathComponent:@"mmkv"] retain];
|
|
939
|
+
return g_basePath;
|
|
940
|
+
} else {
|
|
941
|
+
return @"";
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
+ (void)setMMKVBasePath:(NSString *)basePath {
|
|
946
|
+
if (basePath.length > 0) {
|
|
947
|
+
[g_basePath release];
|
|
948
|
+
g_basePath = [basePath retain];
|
|
949
|
+
[MMKV initializeMMKV:basePath];
|
|
950
|
+
|
|
951
|
+
// still warn about it
|
|
952
|
+
g_hasCalledInitializeMMKV = NO;
|
|
953
|
+
|
|
954
|
+
MMKVInfo("set MMKV base path to: %@", g_basePath);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
+ (NSString *)mmkvGroupPath {
|
|
959
|
+
return g_groupPath;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
- (void)setValue:(nullable id)value forKey:(NSString *)key {
|
|
963
|
+
[super setValue:value forKey:key];
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
- (void)setValue:(nullable id)value forKeyPath:(NSString *)keyPath {
|
|
967
|
+
[super setValue:value forKeyPath:keyPath];
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
static NSString *md5(NSString *value) {
|
|
971
|
+
uint8_t md[MD5_DIGEST_LENGTH] = {};
|
|
972
|
+
char tmp[3] = {}, buf[33] = {};
|
|
973
|
+
auto data = [value dataUsingEncoding:NSUTF8StringEncoding];
|
|
974
|
+
openssl::MD5((uint8_t *) data.bytes, data.length, md);
|
|
975
|
+
for (auto ch : md) {
|
|
976
|
+
snprintf(tmp, sizeof(tmp), "%2.2x", ch);
|
|
977
|
+
strcat(buf, tmp);
|
|
978
|
+
}
|
|
979
|
+
return [NSString stringWithCString:buf encoding:NSASCIIStringEncoding];
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
+ (NSString *)mmapKeyWithMMapID:(NSString *)mmapID rootPath:(nullable NSString *)rootPath {
|
|
983
|
+
NSString *string = nil;
|
|
984
|
+
if ([rootPath length] > 0 && [rootPath isEqualToString:[MMKV mmkvBasePath]] == NO) {
|
|
985
|
+
string = md5([rootPath stringByAppendingPathComponent:mmapID]);
|
|
986
|
+
} else {
|
|
987
|
+
string = mmapID;
|
|
988
|
+
}
|
|
989
|
+
MMKVDebug("mmapKey: %@", string);
|
|
990
|
+
return string;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
+ (BOOL)isFileValid:(NSString *)mmapID {
|
|
994
|
+
return [self isFileValid:mmapID rootPath:nil];
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
+ (BOOL)isFileValid:(NSString *)mmapID rootPath:(nullable NSString *)path {
|
|
998
|
+
if (mmapID.length > 0) {
|
|
999
|
+
if (path.length > 0) {
|
|
1000
|
+
string rootPath(path.UTF8String);
|
|
1001
|
+
return mmkv::MMKV::isFileValid(mmapID.UTF8String, &rootPath);
|
|
1002
|
+
} else {
|
|
1003
|
+
return mmkv::MMKV::isFileValid(mmapID.UTF8String, nullptr);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
return NO;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
#pragma mark - backup & restore
|
|
1010
|
+
|
|
1011
|
+
+ (BOOL)backupOneMMKV:(NSString *)mmapID rootPath:(nullable NSString *)path toDirectory:(NSString *)dstDir {
|
|
1012
|
+
if (path.length > 0) {
|
|
1013
|
+
string rootPath(path.UTF8String);
|
|
1014
|
+
return mmkv::MMKV::backupOneToDirectory(mmapID.UTF8String, dstDir.UTF8String, &rootPath);
|
|
1015
|
+
}
|
|
1016
|
+
return mmkv::MMKV::backupOneToDirectory(mmapID.UTF8String, dstDir.UTF8String);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
+ (BOOL)restoreOneMMKV:(NSString *)mmapID rootPath:(nullable NSString *)path fromDirectory:(NSString *)srcDir {
|
|
1020
|
+
if (path.length > 0) {
|
|
1021
|
+
string rootPath(path.UTF8String);
|
|
1022
|
+
return mmkv::MMKV::restoreOneFromDirectory(mmapID.UTF8String, srcDir.UTF8String, &rootPath);
|
|
1023
|
+
}
|
|
1024
|
+
return mmkv::MMKV::restoreOneFromDirectory(mmapID.UTF8String, srcDir.UTF8String);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
+ (size_t)backupAll:(nullable NSString *)path toDirectory:(NSString *)dstDir {
|
|
1028
|
+
if (path.length > 0) {
|
|
1029
|
+
string rootPath(path.UTF8String);
|
|
1030
|
+
return mmkv::MMKV::backupAllToDirectory(dstDir.UTF8String, &rootPath);
|
|
1031
|
+
}
|
|
1032
|
+
return mmkv::MMKV::backupAllToDirectory(dstDir.UTF8String);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
+ (size_t)restoreAll:(nullable NSString *)path fromDirectory:(NSString *)srcDir {
|
|
1036
|
+
if (path.length > 0) {
|
|
1037
|
+
string rootPath(path.UTF8String);
|
|
1038
|
+
return mmkv::MMKV::restoreAllFromDirectory(srcDir.UTF8String, &rootPath);
|
|
1039
|
+
}
|
|
1040
|
+
return mmkv::MMKV::restoreAllFromDirectory(srcDir.UTF8String);
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
+ (BOOL)backupMultiProcessMMKV:(NSString *)mmapID toDirectory:(NSString *)dstDir {
|
|
1044
|
+
if (!g_groupPath) {
|
|
1045
|
+
MMKVError("Backup a multi-process MMKV [%@] without setting groupDir makes no sense", mmapID);
|
|
1046
|
+
MMKV_ASSERT(0);
|
|
1047
|
+
}
|
|
1048
|
+
return [MMKV backupOneMMKV:mmapID rootPath:g_groupPath toDirectory:dstDir];
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
+ (BOOL)restoreMultiProcessMMKV:(NSString *)mmapID fromDirectory:(NSString *)srcDir {
|
|
1052
|
+
if (!g_groupPath) {
|
|
1053
|
+
MMKVError("Restore a multi-process MMKV [%@] without setting groupDir makes no sense", mmapID);
|
|
1054
|
+
MMKV_ASSERT(0);
|
|
1055
|
+
}
|
|
1056
|
+
return [MMKV restoreOneMMKV:mmapID rootPath:g_groupPath fromDirectory:srcDir];
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
+ (size_t)backupAllMultiProcessToDirectory:(NSString *)dstDir {
|
|
1060
|
+
if (!g_groupPath) {
|
|
1061
|
+
MMKVError("Backup multi-process MMKV without setting groupDir makes no sense.");
|
|
1062
|
+
MMKV_ASSERT(0);
|
|
1063
|
+
}
|
|
1064
|
+
return [MMKV backupAll:g_groupPath toDirectory:dstDir];
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
+ (size_t)restoreAllMultiProcessFromDirectory:(NSString *)srcDir {
|
|
1068
|
+
if (!g_groupPath) {
|
|
1069
|
+
MMKVError("Restore multi-process MMKV without setting groupDir makes no sense.");
|
|
1070
|
+
MMKV_ASSERT(0);
|
|
1071
|
+
}
|
|
1072
|
+
return [MMKV restoreAll:g_groupPath fromDirectory:srcDir];
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
#pragma mark - handler
|
|
1076
|
+
|
|
1077
|
+
+ (void)registerHandler:(id<MMKVHandler>)handler {
|
|
1078
|
+
SCOPED_LOCK(g_lock);
|
|
1079
|
+
[g_callbackHandler release];
|
|
1080
|
+
g_callbackHandler = [handler retain];
|
|
1081
|
+
|
|
1082
|
+
if ([g_callbackHandler respondsToSelector:@selector(mmkvLogWithLevel:file:line:func:message:)]) {
|
|
1083
|
+
g_isLogRedirecting = true;
|
|
1084
|
+
mmkv::MMKV::registerLogHandler(LogHandler);
|
|
1085
|
+
}
|
|
1086
|
+
if ([g_callbackHandler respondsToSelector:@selector(onMMKVCRCCheckFail:)] ||
|
|
1087
|
+
[g_callbackHandler respondsToSelector:@selector(onMMKVFileLengthError:)]) {
|
|
1088
|
+
mmkv::MMKV::registerErrorHandler(ErrorHandler);
|
|
1089
|
+
}
|
|
1090
|
+
if ([g_callbackHandler respondsToSelector:@selector(onMMKVContentChange:)]) {
|
|
1091
|
+
mmkv::MMKV::registerContentChangeHandler(ContentChangeHandler);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
+ (void)unregiserHandler {
|
|
1096
|
+
SCOPED_LOCK(g_lock);
|
|
1097
|
+
|
|
1098
|
+
g_isLogRedirecting = false;
|
|
1099
|
+
[g_callbackHandler release];
|
|
1100
|
+
g_callbackHandler = nil;
|
|
1101
|
+
|
|
1102
|
+
mmkv::MMKV::unRegisterLogHandler();
|
|
1103
|
+
mmkv::MMKV::unRegisterErrorHandler();
|
|
1104
|
+
mmkv::MMKV::unRegisterContentChangeHandler();
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
+ (void)setLogLevel:(MMKVLogLevel)logLevel {
|
|
1108
|
+
mmkv::MMKV::setLogLevel((mmkv::MMKVLogLevel) logLevel);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
- (uint64_t)migrateFromUserDefaultsDictionaryRepresentation:(NSDictionary *)dic {
|
|
1112
|
+
if (dic.count <= 0) {
|
|
1113
|
+
MMKVInfo("migrate data fail, dic is nil or empty");
|
|
1114
|
+
return 0;
|
|
1115
|
+
}
|
|
1116
|
+
@autoreleasepool {
|
|
1117
|
+
__block uint64_t count = 0;
|
|
1118
|
+
[dic enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL *_Nonnull stop) {
|
|
1119
|
+
if ([key isKindOfClass:[NSString class]]) {
|
|
1120
|
+
NSString *stringKey = key;
|
|
1121
|
+
if ([MMKV tranlateData:obj key:stringKey kv:self]) {
|
|
1122
|
+
count++;
|
|
1123
|
+
}
|
|
1124
|
+
} else {
|
|
1125
|
+
MMKVWarning("unknown type of key:%@", key);
|
|
1126
|
+
}
|
|
1127
|
+
}];
|
|
1128
|
+
return count;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
+ (BOOL)tranlateData:(id)obj key:(NSString *)key kv:(MMKV *)kv {
|
|
1133
|
+
if ([obj isKindOfClass:[NSString class]]) {
|
|
1134
|
+
return [kv setString:obj forKey:key];
|
|
1135
|
+
} else if ([obj isKindOfClass:[NSData class]]) {
|
|
1136
|
+
return [kv setData:obj forKey:key];
|
|
1137
|
+
} else if ([obj isKindOfClass:[NSDate class]]) {
|
|
1138
|
+
return [kv setDate:obj forKey:key];
|
|
1139
|
+
} else if ([obj isKindOfClass:[NSNumber class]]) {
|
|
1140
|
+
NSNumber *num = obj;
|
|
1141
|
+
CFNumberType numberType = CFNumberGetType((CFNumberRef) obj);
|
|
1142
|
+
switch (numberType) {
|
|
1143
|
+
case kCFNumberCharType:
|
|
1144
|
+
case kCFNumberSInt8Type:
|
|
1145
|
+
case kCFNumberSInt16Type:
|
|
1146
|
+
case kCFNumberSInt32Type:
|
|
1147
|
+
case kCFNumberIntType:
|
|
1148
|
+
case kCFNumberShortType:
|
|
1149
|
+
return [kv setInt32:num.intValue forKey:key];
|
|
1150
|
+
case kCFNumberSInt64Type:
|
|
1151
|
+
case kCFNumberLongType:
|
|
1152
|
+
case kCFNumberNSIntegerType:
|
|
1153
|
+
case kCFNumberLongLongType:
|
|
1154
|
+
return [kv setInt64:num.longLongValue forKey:key];
|
|
1155
|
+
case kCFNumberFloat32Type:
|
|
1156
|
+
return [kv setFloat:num.floatValue forKey:key];
|
|
1157
|
+
case kCFNumberFloat64Type:
|
|
1158
|
+
case kCFNumberDoubleType:
|
|
1159
|
+
return [kv setDouble:num.doubleValue forKey:key];
|
|
1160
|
+
default:
|
|
1161
|
+
MMKVWarning("unknown number type:%ld, key:%@", (long) numberType, key);
|
|
1162
|
+
return NO;
|
|
1163
|
+
}
|
|
1164
|
+
} else if ([obj isKindOfClass:[NSArray class]] || [obj isKindOfClass:[NSDictionary class]]) {
|
|
1165
|
+
return [kv setObject:obj forKey:key];
|
|
1166
|
+
} else {
|
|
1167
|
+
MMKVWarning("unknown type of key:%@", key);
|
|
1168
|
+
}
|
|
1169
|
+
return NO;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
+ (BOOL)removeStorage:(NSString *)mmapID rootPath:(nullable NSString *)path NS_SWIFT_NAME(removeStorage(for:rootPath:)) {
|
|
1173
|
+
SCOPED_LOCK(g_lock);
|
|
1174
|
+
NSString *kvKey = [MMKV mmapKeyWithMMapID:mmapID rootPath:path];
|
|
1175
|
+
MMKV *kv = [[g_instanceDic objectForKey:kvKey] retain];
|
|
1176
|
+
if (kv != nil) {
|
|
1177
|
+
[g_instanceDic removeObjectForKey:kvKey];
|
|
1178
|
+
if (kv.retainCount > 1) {
|
|
1179
|
+
MMKVWarning("There's still reference on this kv: %@", mmapID);
|
|
1180
|
+
// we can't wait for dealloc
|
|
1181
|
+
kv->m_mmkv = nullptr;
|
|
1182
|
+
}
|
|
1183
|
+
[kv release];
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
if (mmapID.length > 0) {
|
|
1187
|
+
if (path.length > 0) {
|
|
1188
|
+
string rootPath(path.UTF8String);
|
|
1189
|
+
return mmkv::MMKV::removeStorage(mmapID.UTF8String, &rootPath);
|
|
1190
|
+
} else {
|
|
1191
|
+
return mmkv::MMKV::removeStorage(mmapID.UTF8String, nullptr);
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
return NO;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
+ (BOOL)removeStorage:(NSString *)mmapID mode:(MMKVMode)mode NS_SWIFT_NAME(removeStorage(for:mode:)) {
|
|
1198
|
+
auto rootPath = (mode & MMKVSingleProcess) ? nil : g_groupPath;
|
|
1199
|
+
return [self removeStorage:mmapID rootPath:rootPath];
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
+ (BOOL)checkExist:(NSString *)mmapID rootPath:(nullable NSString *)path NS_SWIFT_NAME(checkExist(for:rootPath:)) {
|
|
1203
|
+
if (mmapID.length > 0) {
|
|
1204
|
+
if (path.length > 0) {
|
|
1205
|
+
string rootPath(path.UTF8String);
|
|
1206
|
+
return mmkv::MMKV::checkExist(mmapID.UTF8String, &rootPath);
|
|
1207
|
+
} else {
|
|
1208
|
+
return mmkv::MMKV::checkExist(mmapID.UTF8String, nullptr);
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
return NO;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
+ (BOOL)checkExist:(NSString *)mmapID mode:(MMKVMode)mode NS_SWIFT_NAME(checkExist(for:mode:)) {
|
|
1215
|
+
auto rootPath = (mode & MMKVSingleProcess) ? nil : g_groupPath;
|
|
1216
|
+
return [self checkExist:mmapID rootPath:rootPath];
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
+ (MMKVNameSpace *)nameSpace:(NSString *)rootPath {
|
|
1220
|
+
mmkv::MMKV::nameSpace(rootPath.UTF8String);
|
|
1221
|
+
return [[MMKVNameSpace alloc] initWith:rootPath];
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
+ (MMKVNameSpace *)defaultNameSpace {
|
|
1225
|
+
if (!g_hasCalledInitializeMMKV) {
|
|
1226
|
+
MMKVWarning("MMKV not initialized properly, must call +initializeMMKV: in main thread before calling any other MMKV methods");
|
|
1227
|
+
return nil;
|
|
1228
|
+
}
|
|
1229
|
+
return [[MMKVNameSpace alloc] initWith:[self mmkvBasePath]];
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
@end
|
|
1233
|
+
|
|
1234
|
+
#pragma makr - callbacks
|
|
1235
|
+
|
|
1236
|
+
static void LogHandler(mmkv::MMKVLogLevel level, const char *file, int line, const char *function, NSString *message) {
|
|
1237
|
+
[g_callbackHandler mmkvLogWithLevel:(MMKVLogLevel) level file:file line:line func:function message:message];
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
static mmkv::MMKVRecoverStrategic ErrorHandler(const string &mmapID, mmkv::MMKVErrorType errorType) {
|
|
1241
|
+
if (errorType == mmkv::MMKVCRCCheckFail) {
|
|
1242
|
+
if ([g_callbackHandler respondsToSelector:@selector(onMMKVCRCCheckFail:)]) {
|
|
1243
|
+
auto ret = [g_callbackHandler onMMKVCRCCheckFail:[NSString stringWithUTF8String:mmapID.c_str()]];
|
|
1244
|
+
return (mmkv::MMKVRecoverStrategic) ret;
|
|
1245
|
+
}
|
|
1246
|
+
} else {
|
|
1247
|
+
if ([g_callbackHandler respondsToSelector:@selector(onMMKVFileLengthError:)]) {
|
|
1248
|
+
auto ret = [g_callbackHandler onMMKVFileLengthError:[NSString stringWithUTF8String:mmapID.c_str()]];
|
|
1249
|
+
return (mmkv::MMKVRecoverStrategic) ret;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
return mmkv::OnErrorDiscard;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
static void ContentChangeHandler(const string &mmapID) {
|
|
1256
|
+
if ([g_callbackHandler respondsToSelector:@selector(onMMKVContentChange:)]) {
|
|
1257
|
+
[g_callbackHandler onMMKVContentChange:[NSString stringWithUTF8String:mmapID.c_str()]];
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
#pragma mark - MMKVNameSpace
|
|
1262
|
+
|
|
1263
|
+
@implementation MMKVNameSpace {
|
|
1264
|
+
NSString *_rootPath;
|
|
1265
|
+
string *m_rootPath;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
- (instancetype)initWith:(NSString *)path {
|
|
1269
|
+
if (self = [super init]) {
|
|
1270
|
+
_rootPath = [path retain];
|
|
1271
|
+
m_rootPath = nullptr;
|
|
1272
|
+
}
|
|
1273
|
+
return self;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
- (void) dealloc {
|
|
1277
|
+
[_rootPath release];
|
|
1278
|
+
_rootPath = nil;
|
|
1279
|
+
|
|
1280
|
+
delete m_rootPath;
|
|
1281
|
+
m_rootPath = nullptr;
|
|
1282
|
+
|
|
1283
|
+
[super dealloc];
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
- (NSString *)rootPath {
|
|
1287
|
+
return _rootPath;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
- (string *)strRootPath {
|
|
1291
|
+
if (!m_rootPath) {
|
|
1292
|
+
m_rootPath = new string(_rootPath.UTF8String);
|
|
1293
|
+
}
|
|
1294
|
+
return m_rootPath;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID {
|
|
1298
|
+
return [MMKV doGetWithID:mmapID cryptKey:nil aes256:NO rootPath:_rootPath mode:MMKVSingleProcess expectedCapacity:0];
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID cryptKey:(nullable NSData *)cryptKey {
|
|
1302
|
+
return [MMKV doGetWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:_rootPath mode:MMKVSingleProcess expectedCapacity:0];
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID cryptKey:(nullable NSData *)cryptKey aes256:(BOOL)aes256 {
|
|
1306
|
+
return [MMKV doGetWithID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:_rootPath mode:MMKVSingleProcess expectedCapacity:0];
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID mode:(MMKVMode)mode {
|
|
1310
|
+
return [MMKV doGetWithID:mmapID cryptKey:nil aes256:NO rootPath:_rootPath mode:mode expectedCapacity:0];
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID cryptKey:(nullable NSData *)cryptKey mode:(MMKVMode)mode {
|
|
1314
|
+
return [MMKV doGetWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:_rootPath mode:mode expectedCapacity:0];
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID cryptKey:(nullable NSData *)cryptKey aes256:(BOOL)aes256 mode:(MMKVMode)mode {
|
|
1318
|
+
return [MMKV doGetWithID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:_rootPath mode:mode expectedCapacity:0];
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID expectedCapacity:(size_t)expectedCapacity {
|
|
1322
|
+
return [MMKV doGetWithID:mmapID cryptKey:nil aes256:NO rootPath:_rootPath mode:MMKVSingleProcess expectedCapacity:expectedCapacity];
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID cryptKey:(nullable NSData *)cryptKey expectedCapacity:(size_t)expectedCapacity {
|
|
1326
|
+
return [MMKV doGetWithID:mmapID cryptKey:cryptKey aes256:NO rootPath:_rootPath mode:MMKVSingleProcess expectedCapacity:expectedCapacity];
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
- (nullable MMKV *)mmkvWithID:(nonnull NSString *)mmapID cryptKey:(nullable NSData *)cryptKey aes256:(BOOL)aes256 expectedCapacity:(size_t)expectedCapacity {
|
|
1330
|
+
return [MMKV doGetWithID:mmapID cryptKey:cryptKey aes256:aes256 rootPath:_rootPath mode:MMKVSingleProcess expectedCapacity:expectedCapacity];
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
- (BOOL)backupOneMMKV:(NSString *)mmapID toDirectory:(NSString *)dstDir {
|
|
1334
|
+
return mmkv::MMKV::backupOneToDirectory(mmapID.UTF8String, dstDir.UTF8String, [self strRootPath]);
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
- (BOOL)restoreOneMMKV:(NSString *)mmapID fromDirectory:(NSString *)srcDir {
|
|
1338
|
+
return mmkv::MMKV::restoreOneFromDirectory(mmapID.UTF8String, srcDir.UTF8String, [self strRootPath]);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
- (size_t)backupAllToDirectory:(NSString *)dstDir {
|
|
1342
|
+
return mmkv::MMKV::backupAllToDirectory(dstDir.UTF8String, [self strRootPath]);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
- (size_t)restoreAllFromDirectory:(NSString *)srcDir {
|
|
1346
|
+
return mmkv::MMKV::restoreAllFromDirectory(srcDir.UTF8String, [self strRootPath]);
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
- (BOOL)isFileValid:(NSString *)mmapID {
|
|
1350
|
+
return mmkv::MMKV::isFileValid(mmapID.UTF8String, [self strRootPath]);
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
- (BOOL)removeStorage:(NSString *)mmapID {
|
|
1354
|
+
return mmkv::MMKV::removeStorage(mmapID.UTF8String, [self strRootPath]);
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
- (BOOL)checkExist:(NSString *)mmapID {
|
|
1358
|
+
return mmkv::MMKV::checkExist(mmapID.UTF8String, [self strRootPath]);
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
@end
|