react-native-dev-guard 0.0.1 → 1.0.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/LICENSE +1 -1
- package/README.md +190 -44
- package/android/src/main/cpp/devguard-lib.cpp +12 -11
- package/android/src/main/java/com/devguard/DevGuardModule.kt +15 -0
- package/cpp/devguard_core.c +82 -4
- package/cpp/devguard_core.h +15 -13
- package/ios/DevGuard.mm +20 -6
- package/lib/components/LockScreen.d.ts +2 -0
- package/lib/components/LockScreen.js +90 -44
- package/lib/index.d.ts +4 -1
- package/lib/index.js +179 -152
- package/lib/internal/obf.d.ts +72 -0
- package/lib/internal/obf.js +100 -0
- package/lib/services/CacheService.d.ts +5 -1
- package/lib/services/CacheService.js +8 -12
- package/lib/services/DevGuardLogger.d.ts +1 -1
- package/lib/services/DevGuardLogger.js +13 -3
- package/lib/services/DeviceTokenService.d.ts +4 -1
- package/lib/services/DeviceTokenService.js +5 -2
- package/lib/services/GuardEnforcement.d.ts +3 -12
- package/lib/services/GuardEnforcement.js +34 -15
- package/lib/services/HardwareService.d.ts +14 -1
- package/lib/services/HardwareService.js +63 -1
- package/lib/services/cacheCrypto.d.ts +6 -0
- package/lib/services/cacheCrypto.js +40 -0
- package/lib/types/branding.d.ts +21 -0
- package/lib/types/branding.js +30 -0
- package/lib/utils/contactUrls.d.ts +4 -0
- package/lib/utils/contactUrls.js +18 -0
- package/package.json +28 -8
- package/react-native-dev-guard.podspec +19 -0
- package/screenshots/access-suspended.png +0 -0
- package/screenshots/payment-reminder.png +0 -0
- package/screenshots/welcome-screen.png +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.cmake/api/v1/query/client-agp/cache-v2 +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.cmake/api/v1/query/client-agp/cmakeFiles-v1 +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.cmake/api/v1/query/client-agp/codemodel-v2 +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.cmake/api/v1/reply/cache-v2-ca87e29d866016c47643.json +0 -1287
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.cmake/api/v1/reply/cmakeFiles-v1-afc39e04c88d618b9499.json +0 -182
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.cmake/api/v1/reply/codemodel-v2-004ad46f03b4d6b2acd6.json +0 -59
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.cmake/api/v1/reply/index-2026-05-15T08-21-19-0083.json +0 -92
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.cmake/api/v1/reply/target-devguard-Debug-8c0ebbb0cdb88d164b64.json +0 -160
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.ninja_deps +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/.ninja_log +0 -15
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeCache.txt +0 -391
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeCCompiler.cmake +0 -77
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeCXXCompiler.cmake +0 -89
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeDetermineCompilerABI_C.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake +0 -15
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/CMakeOutput.log +0 -236
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/TargetDirectories.txt +0 -3
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/cmake.check_cache +0 -1
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/devguard.dir/devguard-lib.cpp.o +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/CMakeFiles/rules.ninja +0 -74
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/additional_project_files.txt +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/android_gradle_build.json +0 -40
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/android_gradle_build_mini.json +0 -27
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/build.ninja +0 -154
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/build_file_index.txt +0 -1
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/cmake_install.cmake +0 -54
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/compile_commands.json +0 -12
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/compile_commands.json.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/configure_fingerprint.bin +0 -29
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/metadata_generation_command.txt +0 -19
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/prefab_config.json +0 -4
- package/android/.cxx/Debug/4s4f1av3/arm64-v8a/symbol_folder_index.txt +0 -1
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.cmake/api/v1/query/client-agp/cache-v2 +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.cmake/api/v1/query/client-agp/cmakeFiles-v1 +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.cmake/api/v1/query/client-agp/codemodel-v2 +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.cmake/api/v1/reply/cache-v2-02400eb6fc4793fa6bf2.json +0 -1287
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.cmake/api/v1/reply/cmakeFiles-v1-d0fc95efa84cbe47849a.json +0 -379
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.cmake/api/v1/reply/codemodel-v2-a7a363de64e45a261589.json +0 -59
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.cmake/api/v1/reply/index-2026-05-15T08-21-21-0243.json +0 -92
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.cmake/api/v1/reply/target-devguard-Debug-53eeaa7145cf9770f3d7.json +0 -160
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.ninja_deps +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/.ninja_log +0 -10
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeCache.txt +0 -391
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/3.18.1-g262b901/CMakeCCompiler.cmake +0 -77
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/3.18.1-g262b901/CMakeCXXCompiler.cmake +0 -89
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/3.18.1-g262b901/CMakeDetermineCompilerABI_C.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/3.18.1-g262b901/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake +0 -15
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/CMakeOutput.log +0 -240
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/TargetDirectories.txt +0 -3
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/cmake.check_cache +0 -1
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/devguard.dir/devguard-lib.cpp.o +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/CMakeFiles/rules.ninja +0 -74
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/additional_project_files.txt +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/android_gradle_build.json +0 -40
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/android_gradle_build_mini.json +0 -27
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/build.ninja +0 -154
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/build_file_index.txt +0 -1
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/cmake_install.cmake +0 -54
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/compile_commands.json +0 -12
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/compile_commands.json.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/configure_fingerprint.bin +0 -29
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/metadata_generation_command.txt +0 -19
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/prefab_config.json +0 -4
- package/android/.cxx/Debug/4s4f1av3/armeabi-v7a/symbol_folder_index.txt +0 -1
- package/android/.cxx/Debug/4s4f1av3/hash_key.txt +0 -26
- package/android/.cxx/Debug/4s4f1av3/x86/.cmake/api/v1/query/client-agp/cache-v2 +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/.cmake/api/v1/query/client-agp/cmakeFiles-v1 +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/.cmake/api/v1/query/client-agp/codemodel-v2 +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/.cmake/api/v1/reply/cache-v2-ec883f5c922c646acf2d.json +0 -1287
- package/android/.cxx/Debug/4s4f1av3/x86/.cmake/api/v1/reply/cmakeFiles-v1-028bf03c3b9bd0e609c0.json +0 -379
- package/android/.cxx/Debug/4s4f1av3/x86/.cmake/api/v1/reply/codemodel-v2-6c0215a4bb6e3b0b5223.json +0 -59
- package/android/.cxx/Debug/4s4f1av3/x86/.cmake/api/v1/reply/index-2026-05-15T08-21-22-0722.json +0 -92
- package/android/.cxx/Debug/4s4f1av3/x86/.cmake/api/v1/reply/target-devguard-Debug-2139b18dc63b630666db.json +0 -160
- package/android/.cxx/Debug/4s4f1av3/x86/.ninja_deps +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/.ninja_log +0 -10
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeCache.txt +0 -391
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/3.18.1-g262b901/CMakeCCompiler.cmake +0 -77
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/3.18.1-g262b901/CMakeCXXCompiler.cmake +0 -89
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/3.18.1-g262b901/CMakeDetermineCompilerABI_C.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/3.18.1-g262b901/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake +0 -15
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/CMakeOutput.log +0 -230
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/TargetDirectories.txt +0 -3
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/cmake.check_cache +0 -1
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/devguard.dir/devguard-lib.cpp.o +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/CMakeFiles/rules.ninja +0 -74
- package/android/.cxx/Debug/4s4f1av3/x86/additional_project_files.txt +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/android_gradle_build.json +0 -40
- package/android/.cxx/Debug/4s4f1av3/x86/android_gradle_build_mini.json +0 -27
- package/android/.cxx/Debug/4s4f1av3/x86/build.ninja +0 -154
- package/android/.cxx/Debug/4s4f1av3/x86/build_file_index.txt +0 -1
- package/android/.cxx/Debug/4s4f1av3/x86/cmake_install.cmake +0 -54
- package/android/.cxx/Debug/4s4f1av3/x86/compile_commands.json +0 -12
- package/android/.cxx/Debug/4s4f1av3/x86/compile_commands.json.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86/configure_fingerprint.bin +0 -29
- package/android/.cxx/Debug/4s4f1av3/x86/metadata_generation_command.txt +0 -19
- package/android/.cxx/Debug/4s4f1av3/x86/prefab_config.json +0 -4
- package/android/.cxx/Debug/4s4f1av3/x86/symbol_folder_index.txt +0 -1
- package/android/.cxx/Debug/4s4f1av3/x86_64/.cmake/api/v1/query/client-agp/cache-v2 +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/.cmake/api/v1/query/client-agp/cmakeFiles-v1 +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/.cmake/api/v1/query/client-agp/codemodel-v2 +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/.cmake/api/v1/reply/cache-v2-7ec870c116aeb770686e.json +0 -1287
- package/android/.cxx/Debug/4s4f1av3/x86_64/.cmake/api/v1/reply/cmakeFiles-v1-f2e6a276d8adf420c6b9.json +0 -379
- package/android/.cxx/Debug/4s4f1av3/x86_64/.cmake/api/v1/reply/codemodel-v2-a4f2c2fefb1e4261b2d6.json +0 -59
- package/android/.cxx/Debug/4s4f1av3/x86_64/.cmake/api/v1/reply/index-2026-05-15T08-21-24-0187.json +0 -92
- package/android/.cxx/Debug/4s4f1av3/x86_64/.cmake/api/v1/reply/target-devguard-Debug-077cad881ac8d6864f8f.json +0 -160
- package/android/.cxx/Debug/4s4f1av3/x86_64/.ninja_deps +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/.ninja_log +0 -10
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeCache.txt +0 -391
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/3.18.1-g262b901/CMakeCCompiler.cmake +0 -77
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/3.18.1-g262b901/CMakeCXXCompiler.cmake +0 -89
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/3.18.1-g262b901/CMakeDetermineCompilerABI_C.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/3.18.1-g262b901/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake +0 -15
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/CMakeOutput.log +0 -230
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/TargetDirectories.txt +0 -3
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/cmake.check_cache +0 -1
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/devguard.dir/devguard-lib.cpp.o +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/CMakeFiles/rules.ninja +0 -74
- package/android/.cxx/Debug/4s4f1av3/x86_64/additional_project_files.txt +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/android_gradle_build.json +0 -40
- package/android/.cxx/Debug/4s4f1av3/x86_64/android_gradle_build_mini.json +0 -27
- package/android/.cxx/Debug/4s4f1av3/x86_64/build.ninja +0 -154
- package/android/.cxx/Debug/4s4f1av3/x86_64/build_file_index.txt +0 -1
- package/android/.cxx/Debug/4s4f1av3/x86_64/cmake_install.cmake +0 -54
- package/android/.cxx/Debug/4s4f1av3/x86_64/compile_commands.json +0 -12
- package/android/.cxx/Debug/4s4f1av3/x86_64/compile_commands.json.bin +0 -0
- package/android/.cxx/Debug/4s4f1av3/x86_64/configure_fingerprint.bin +0 -29
- package/android/.cxx/Debug/4s4f1av3/x86_64/metadata_generation_command.txt +0 -19
- package/android/.cxx/Debug/4s4f1av3/x86_64/prefab_config.json +0 -4
- package/android/.cxx/Debug/4s4f1av3/x86_64/symbol_folder_index.txt +0 -1
- package/android/.cxx/tools/debug/arm64-v8a/compile_commands.json +0 -12
- package/android/.cxx/tools/debug/armeabi-v7a/compile_commands.json +0 -12
- package/android/.cxx/tools/debug/x86/compile_commands.json +0 -12
- package/android/.cxx/tools/debug/x86_64/compile_commands.json +0 -12
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build/.transforms/07ab8b2284230b9b98454cb3baa5db54/results.bin +0 -1
- package/android/build/.transforms/07ab8b2284230b9b98454cb3baa5db54/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/devguard/BuildConfig.dex +0 -0
- package/android/build/.transforms/07ab8b2284230b9b98454cb3baa5db54/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/devguard/DevGuardModule.dex +0 -0
- package/android/build/.transforms/07ab8b2284230b9b98454cb3baa5db54/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/devguard/DevGuardPackage.dex +0 -0
- package/android/build/.transforms/07ab8b2284230b9b98454cb3baa5db54/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/ae351402e6cba75b162136aa850e1ba2/results.bin +0 -1
- package/android/build/.transforms/ae351402e6cba75b162136aa850e1ba2/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/devguard/BuildConfig.java +0 -10
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -9
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/build_command_devguard +0 -4
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/build_model.json +0 -187
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/build_stderr_devguard.txt +0 -0
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/build_stdout_devguard.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/generate_cxx_metadata_111_timing.txt +0 -3
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/generate_cxx_metadata_1463_timing.txt +0 -3
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/generate_cxx_metadata_324_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/generate_cxx_metadata_475_timing.txt +0 -3
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/generate_cxx_metadata_622_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/arm64-v8a/metadata_generation_record.json +0 -41
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/build_command_devguard +0 -4
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/build_model.json +0 -187
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/build_stderr_devguard.txt +0 -0
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/build_stdout_devguard.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/generate_cxx_metadata_111_timing.txt +0 -3
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/generate_cxx_metadata_1459_timing.txt +0 -3
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/generate_cxx_metadata_324_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/generate_cxx_metadata_475_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/generate_cxx_metadata_622_timing.txt +0 -3
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/armeabi-v7a/metadata_generation_record.json +0 -41
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/build_command_devguard +0 -4
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/build_model.json +0 -187
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/build_stderr_devguard.txt +0 -0
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/build_stdout_devguard.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/generate_cxx_metadata_111_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/generate_cxx_metadata_1459_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/generate_cxx_metadata_324_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/generate_cxx_metadata_475_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/generate_cxx_metadata_622_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86/metadata_generation_record.json +0 -41
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/build_command_devguard +0 -4
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/build_model.json +0 -187
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/build_stderr_devguard.txt +0 -0
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/build_stdout_devguard.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/generate_cxx_metadata_111_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/generate_cxx_metadata_1459_timing.txt +0 -3
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/generate_cxx_metadata_324_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/generate_cxx_metadata_475_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/generate_cxx_metadata_622_timing.txt +0 -2
- package/android/build/intermediates/cxx/Debug/4s4f1av3/logs/x86_64/metadata_generation_record.json +0 -41
- package/android/build/intermediates/cxx/Debug/4s4f1av3/obj/arm64-v8a/libdevguard.so +0 -0
- package/android/build/intermediates/cxx/Debug/4s4f1av3/obj/armeabi-v7a/libdevguard.so +0 -0
- package/android/build/intermediates/cxx/Debug/4s4f1av3/obj/x86/libdevguard.so +0 -0
- package/android/build/intermediates/cxx/Debug/4s4f1av3/obj/x86_64/libdevguard.so +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-dev-guard_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/devguard/BuildConfig.class +0 -0
- package/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libdevguard.so +0 -0
- package/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/armeabi-v7a/libdevguard.so +0 -0
- package/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/x86/libdevguard.so +0 -0
- package/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/x86_64/libdevguard.so +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -11
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -9
- package/android/build/intermediates/merged_native_libs/debug/mergeDebugNativeLibs/out/lib/arm64-v8a/libdevguard.so +0 -0
- package/android/build/intermediates/merged_native_libs/debug/mergeDebugNativeLibs/out/lib/armeabi-v7a/libdevguard.so +0 -0
- package/android/build/intermediates/merged_native_libs/debug/mergeDebugNativeLibs/out/lib/x86/libdevguard.so +0 -0
- package/android/build/intermediates/merged_native_libs/debug/mergeDebugNativeLibs/out/lib/x86_64/libdevguard.so +0 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-dev-guard_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/devguard/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/devguard/DevGuardModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/devguard/DevGuardPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -21
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-dev-guard_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/devguard/DevGuardModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/devguard/DevGuardPackage.class +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,85 +1,231 @@
|
|
|
1
1
|
# React Native DevGuard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://devguard.uk"><img src="https://img.shields.io/badge/website-devguard.uk-6C47FF?style=flat-square" alt="Website" /></a>
|
|
5
|
+
<img src="https://img.shields.io/badge/platforms-iOS%20%7C%20Android-2D7DD2?style=flat-square" alt="Platforms" />
|
|
6
|
+
<img src="https://img.shields.io/badge/license-MIT-3CB371?style=flat-square" alt="License" />
|
|
7
|
+
</p>
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
**Protect your apps. Get paid.** DevGuard is a remote licensing and application-protection layer for React Native. Remotely **lock, warn, wipe, and monitor** your published apps from the DevGuard dashboard — ideal for agencies and developers who need to enforce payment terms or revoke access to client deliverables. Security-critical operations (HMAC signing, the shared secret, GZip telemetry) run inside a compiled **Native C++ module** so your keys never sit in plain JavaScript.
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- GZip tunnel (`v1-gzip`) for compact telemetry
|
|
10
|
-
- Heartbeat and lifecycle sync policies
|
|
11
|
-
- Hardware fingerprinting and emulator blocking
|
|
12
|
-
- Nonce-based remote wipe
|
|
13
|
-
- Privacy-gated advanced telemetry (RAM, storage, battery)
|
|
11
|
+
> 👉 **Create your free account and grab your keys at [devguard.uk](https://devguard.uk).**
|
|
12
|
+
> You'll need a **Project ID** and a **Master Secret** to initialize the SDK.
|
|
14
13
|
|
|
15
|
-
##
|
|
14
|
+
## 📱 How it looks
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
- React 19.2.x
|
|
19
|
-
- iOS 15.1+ · Android minSdk 24
|
|
16
|
+
The Lock Screen, warning toast, and diagnostics overlay are all **built in** — you don't build any UI. DevGuard renders the right screen automatically based on the status returned by your dashboard.
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
<table>
|
|
19
|
+
<tr>
|
|
20
|
+
<td align="center" width="33%"><img src="screenshots/welcome-screen.png" width="240" alt="Active and protected app" /></td>
|
|
21
|
+
<td align="center" width="33%"><img src="screenshots/payment-reminder.png" width="240" alt="In-app warning toast" /></td>
|
|
22
|
+
<td align="center" width="33%"><img src="screenshots/access-suspended.png" width="240" alt="Access suspended lock screen" /></td>
|
|
23
|
+
</tr>
|
|
24
|
+
<tr>
|
|
25
|
+
<td align="center"><b>Active & Protected</b><br/>Your app runs normally · <code>ACTIVE</code></td>
|
|
26
|
+
<td align="center"><b>In-App Warning</b><br/>Non-blocking toast (e.g. payment reminder) · <code>WARNING</code></td>
|
|
27
|
+
<td align="center"><b>Access Suspended</b><br/>Automatic Lock Screen with your support contacts · <code>LOCKED</code></td>
|
|
28
|
+
</tr>
|
|
29
|
+
</table>
|
|
30
|
+
|
|
31
|
+
## ✨ Features
|
|
32
|
+
|
|
33
|
+
- **Glassmorphic Lock Screen**: Premium, built-in UI that blocks access instantly — with your WhatsApp / Email / Call support buttons and an optional unlock-key entry.
|
|
34
|
+
- **Native Security**: HMAC signing and the shared secret are handled in compiled C++ to prevent secret extraction.
|
|
35
|
+
- **GZip Tunneling**: Compact telemetry payloads for minimum data usage.
|
|
36
|
+
- **Remote Config**: Access server-defined JSON settings via the `response` object.
|
|
37
|
+
- **Heartbeat & Sync**: Automated background pings (with `lifecycleSync` / `syncPolicy` support) to keep license status fresh.
|
|
38
|
+
- **Hardware Fingerprinting**: Robust device identity that survives app re-installs.
|
|
39
|
+
- **Emulator Blocking**: When the project enables `blockEmulators`, the SDK locks on emulators/simulators automatically.
|
|
40
|
+
- **Hardened Remote Wipe**: Nonce-based remote wipe clears the response cache, usage logs, local diagnostic vault, and stored device-user identity.
|
|
41
|
+
- **Privacy-Gated Telemetry**: Advanced metrics (RAM, storage, battery, network) are only collected after the server enables `advancedTelemetry`.
|
|
42
|
+
|
|
43
|
+
## 🚀 Getting Started
|
|
44
|
+
|
|
45
|
+
### 1. Create your DevGuard account
|
|
46
|
+
|
|
47
|
+
1. Sign up at **[devguard.uk](https://devguard.uk)**.
|
|
48
|
+
2. Create a **Project** in the dashboard.
|
|
49
|
+
3. Copy your **Project ID** and **Master Secret** (Settings → Master Secret). You'll pass both to the SDK below.
|
|
50
|
+
|
|
51
|
+
### 2. Install
|
|
22
52
|
|
|
23
53
|
```bash
|
|
24
54
|
npm install react-native-dev-guard react-native-device-info react-native-keychain @react-native-async-storage/async-storage
|
|
25
|
-
|
|
55
|
+
# or
|
|
56
|
+
yarn add react-native-dev-guard react-native-device-info react-native-keychain @react-native-async-storage/async-storage
|
|
26
57
|
```
|
|
27
58
|
|
|
28
|
-
|
|
59
|
+
`@react-native-async-storage/async-storage` is required by the bundled Vault Logger (local diagnostics). Use **v3.x** with React Native 0.85+; run `npx pod-install` after adding it on iOS.
|
|
60
|
+
|
|
61
|
+
### 3. Native setup
|
|
62
|
+
|
|
63
|
+
#### Requirements
|
|
64
|
+
- **React Native** `0.85.x` (tested on `0.85.3`)
|
|
65
|
+
- **React** `19.2.x`
|
|
66
|
+
- **iOS** 15.1+ · **Android** minSdk 24
|
|
67
|
+
|
|
68
|
+
#### iOS
|
|
69
|
+
1. Open `ios/Podfile` and ensure your target meets React Native's minimum iOS version (`min_ios_version_supported`, currently 15.1).
|
|
70
|
+
2. Run `npx pod-install`.
|
|
71
|
+
|
|
72
|
+
#### Android
|
|
73
|
+
Ensure your app `minSdkVersion` is at least **24** (matches the RN 0.85 template).
|
|
74
|
+
|
|
75
|
+
### 4. Protect your app
|
|
76
|
+
|
|
77
|
+
Wrap your application root with `DevGuardProvider`. That's it — once the status returned by your dashboard is `LOCKED`, the Lock Screen appears automatically.
|
|
29
78
|
|
|
30
79
|
```tsx
|
|
31
80
|
import React from 'react';
|
|
32
81
|
import { DevGuardProvider } from 'react-native-dev-guard';
|
|
33
82
|
|
|
34
|
-
const App = () =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
83
|
+
const App = () => {
|
|
84
|
+
return (
|
|
85
|
+
<DevGuardProvider
|
|
86
|
+
projectId="your_project_id" // From the DevGuard dashboard
|
|
87
|
+
secret="YOUR_MASTER_SECRET" // Settings → Master Secret
|
|
88
|
+
autoProtect={true} // Auto-show the Lock Screen when LOCKED
|
|
89
|
+
failSafe="open" // 'open' or 'closed' (offline behavior, no cache)
|
|
90
|
+
>
|
|
91
|
+
<MainApp />
|
|
92
|
+
</DevGuardProvider>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default App;
|
|
44
97
|
```
|
|
45
98
|
|
|
46
|
-
|
|
99
|
+
## 🧭 Status lifecycle
|
|
100
|
+
|
|
101
|
+
DevGuard syncs on app launch, on foreground/background, and on a server-defined heartbeat. The current `status` drives what the user sees:
|
|
102
|
+
|
|
103
|
+
| Status | Meaning | What the user sees |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| `ACTIVE` | Valid license / access granted. | Your app, running normally. |
|
|
106
|
+
| `WARNING` | App still works, but a notice is shown. | A non-blocking toast (e.g. *"Payment reminder"*). |
|
|
107
|
+
| `LOCKED` | Access revoked by you. | The built-in **Lock Screen** (when `autoProtect`). |
|
|
108
|
+
| `EXPIRED` | License expired. | Treated as locked. |
|
|
109
|
+
| `PENDING` | Initial state before the first successful sync (`failSafe: open`). | Your app (optimistic). |
|
|
110
|
+
| `ERROR` | Sync failed. | Depends on `failSafe` (see below). |
|
|
111
|
+
|
|
112
|
+
## 🪝 API
|
|
113
|
+
|
|
114
|
+
### `<DevGuardProvider>` props
|
|
115
|
+
|
|
116
|
+
| Prop | Type | Default | Description |
|
|
117
|
+
| --- | --- | --- | --- |
|
|
118
|
+
| `projectId` | `string` | **required** | Your DevGuard project ID. |
|
|
119
|
+
| `secret` | `string` | — | Your account **Master Secret** (Settings → Master Secret), used to authenticate requests. |
|
|
120
|
+
| `autoProtect` | `boolean` | `true` | Automatically render the built-in Lock Screen when status is `LOCKED` / `EXPIRED`. |
|
|
121
|
+
| `failSafe` | `'open' \| 'closed'` | `'open'` | Behavior when the server is unreachable and no cache exists. `open` keeps the app usable; `closed` locks it. |
|
|
122
|
+
| `apiKey` | `string` | — | **Deprecated** alias for `secret`. |
|
|
123
|
+
|
|
124
|
+
### `useDevGuard()`
|
|
47
125
|
|
|
48
126
|
```tsx
|
|
49
127
|
import { useDevGuard } from 'react-native-dev-guard';
|
|
50
128
|
|
|
51
129
|
const MyComponent = () => {
|
|
52
130
|
const { status, response, isLocked, verify } = useDevGuard();
|
|
53
|
-
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<View>
|
|
134
|
+
<Text>Status: {status}</Text>
|
|
135
|
+
{response?.betaFeatures?.showBetaFeature && <BetaComponent />}
|
|
136
|
+
</View>
|
|
137
|
+
);
|
|
54
138
|
};
|
|
55
139
|
```
|
|
56
140
|
|
|
57
|
-
|
|
141
|
+
| Field | Type | Description |
|
|
142
|
+
| --- | --- | --- |
|
|
143
|
+
| `status` | `GuardStatus` | `ACTIVE` · `WARNING` · `LOCKED` · `EXPIRED` · `PENDING` · `ERROR`. |
|
|
144
|
+
| `isLocked` | `boolean` | `true` when status is `LOCKED` or `EXPIRED`. |
|
|
145
|
+
| `response` | `GuardResponse \| null` | Full server response (messages, contacts, `config`, `betaFeatures`, etc.). |
|
|
146
|
+
| `verify` | `(force?: boolean) => Promise<void>` | Manually trigger a license sync. |
|
|
147
|
+
| `unlock` | `(key: string) => Promise<boolean>` | Submit an unlock key; resolves `true` on success. |
|
|
148
|
+
| `setDeviceUser` | `(username?, email?, phone?, customData?) => Promise<void>` | Register the signed-in app user so they appear in the Developer Portal. |
|
|
149
|
+
|
|
150
|
+
### Track app users in the Developer Portal
|
|
58
151
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
152
|
+
When someone signs in or registers in your app, pass their profile to DevGuard. You'll then be able to see **how many users are using your application** in the **Developer Portal** — total user count, recent activity, and basic profile fields (username, email, phone, and any custom metadata you attach).
|
|
153
|
+
|
|
154
|
+
Call this after login or registration (all parameters are optional):
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
const { setDeviceUser } = useDevGuard();
|
|
158
|
+
|
|
159
|
+
await setDeviceUser(
|
|
160
|
+
'jane_doe', // username
|
|
161
|
+
'jane@example.com', // email
|
|
162
|
+
'+15551234567', // phone
|
|
163
|
+
{ plan: 'pro' } // any custom data
|
|
164
|
+
);
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Open **Developer Portal → Users** to view your app's user base and engagement.
|
|
65
168
|
|
|
66
169
|
### Manual verification
|
|
67
170
|
|
|
171
|
+
Force a sync after a meaningful event (e.g. login or payment):
|
|
172
|
+
|
|
68
173
|
```tsx
|
|
69
174
|
const { verify } = useDevGuard();
|
|
70
|
-
await verify(true); //
|
|
175
|
+
await verify(true); // true forces a sync regardless of policy
|
|
71
176
|
```
|
|
72
177
|
|
|
73
|
-
###
|
|
178
|
+
### Unlock with a key
|
|
179
|
+
|
|
180
|
+
The built-in Lock Screen already includes an **"Enter Unlock Key"** flow, so most apps never call this directly — but it's available if you want a custom UI:
|
|
181
|
+
|
|
182
|
+
```tsx
|
|
183
|
+
const { unlock } = useDevGuard();
|
|
184
|
+
const ok = await unlock('USER-ENTERED-KEY');
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## 🐞 Diagnostic Overlay & Vault Logger
|
|
188
|
+
|
|
189
|
+
DevGuard includes an integrated diagnostic UI (the Bug Icon) and a local Vault Logger for advanced debugging without rebuilding your app.
|
|
190
|
+
|
|
191
|
+
### Vault Logger
|
|
192
|
+
The SDK bundles `react-native-vault-logger`. By default, it automatically captures fatal JS errors and usage info, saving them securely to local storage using **per-device keys** derived from the hardware `deviceId` at init (no static secret in source).
|
|
193
|
+
You can manually log data to the Info Vault:
|
|
194
|
+
```tsx
|
|
195
|
+
import { DevGuardLogger } from 'react-native-dev-guard/src/services/DevGuardLogger';
|
|
196
|
+
|
|
197
|
+
DevGuardLogger.info('User completed onboarding', { userId: 123 });
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### The Bug Icon (Diagnostic Overlay)
|
|
201
|
+
To view telemetry and logs directly inside the running app without connecting a debugger:
|
|
202
|
+
1. Go to your DevGuard Admin Control Center.
|
|
203
|
+
2. Ensure you have configured a **6-digit Diagnostic Passcode**.
|
|
204
|
+
3. Under the project settings, toggle on **Enable Diagnostic Logs (Beta Feature)** for the desired devices.
|
|
205
|
+
4. A floating **🐛 Bug Icon** will appear in your app.
|
|
206
|
+
5. Tap it and enter your Passcode to view device telemetry and access diagnostic vaults.
|
|
207
|
+
|
|
208
|
+
## ⚙️ Configuration
|
|
209
|
+
|
|
210
|
+
### Fail-Safe Modes
|
|
211
|
+
- **`open` (Default)**: If the server is unreachable and no cache exists, the app remains accessible.
|
|
212
|
+
- **`closed`**: The app will lock until a successful status is fetched.
|
|
213
|
+
|
|
214
|
+
## 🔐 Security Best Practices
|
|
215
|
+
|
|
216
|
+
1. **Release builds**: Use `javascript-obfuscator` or similar tools for your JS bundle.
|
|
217
|
+
2. **Hermes**: Ensure Hermes is enabled in your `app/build.gradle` and `Podfile` to benefit from bytecode pre-compilation.
|
|
218
|
+
3. **ProGuard**: Use the included ProGuard rules to protect the native C++ library.
|
|
74
219
|
|
|
75
|
-
|
|
220
|
+
## 💬 Support & Contact
|
|
76
221
|
|
|
77
|
-
|
|
222
|
+
- 🌐 **Website / register:** [devguard.uk](https://devguard.uk)
|
|
223
|
+
- 📧 **Email:** [contact@devguard.uk](mailto:contact@devguard.uk)
|
|
224
|
+
- 🐛 **Issues:** [GitHub Issues](https://github.com/DevGuard-uk/react-native-dev-guard/issues)
|
|
78
225
|
|
|
79
|
-
|
|
80
|
-
- Enable Hermes and ProGuard (see `example/android/app/proguard-rules.pro`)
|
|
81
|
-
- Never commit your Master Secret to source control
|
|
226
|
+
## 📄 License
|
|
82
227
|
|
|
83
|
-
|
|
228
|
+
MIT © [DevGuard](https://devguard.uk)
|
|
84
229
|
|
|
85
|
-
|
|
230
|
+
---
|
|
231
|
+
*Secure by Design. Managed by You.*
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#include <jni.h>
|
|
2
|
-
#include <string>
|
|
3
2
|
#include "devguard_core.h"
|
|
4
3
|
|
|
5
4
|
extern "C" JNIEXPORT jstring JNICALL
|
|
@@ -8,14 +7,10 @@ Java_com_devguard_DevGuardModule_generateSignatureNative(
|
|
|
8
7
|
jobject /* this */,
|
|
9
8
|
jstring projectId,
|
|
10
9
|
jlong timestamp) {
|
|
11
|
-
|
|
12
10
|
const char *project_id_c = env->GetStringUTFChars(projectId, 0);
|
|
13
11
|
char output[65];
|
|
14
|
-
|
|
15
|
-
generate_signature(project_id_c, (long long)timestamp, output);
|
|
16
|
-
|
|
12
|
+
dg_x9(project_id_c, (long long)timestamp, output);
|
|
17
13
|
env->ReleaseStringUTFChars(projectId, project_id_c);
|
|
18
|
-
|
|
19
14
|
return env->NewStringUTF(output);
|
|
20
15
|
}
|
|
21
16
|
|
|
@@ -25,14 +20,20 @@ Java_com_devguard_DevGuardModule_verifyResponseNative(
|
|
|
25
20
|
jobject /* this */,
|
|
26
21
|
jstring responseBody,
|
|
27
22
|
jstring signature) {
|
|
28
|
-
|
|
29
23
|
const char *response_body_c = env->GetStringUTFChars(responseBody, 0);
|
|
30
24
|
const char *signature_c = env->GetStringUTFChars(signature, 0);
|
|
31
|
-
|
|
32
|
-
int result = verify_response(response_body_c, signature_c);
|
|
33
|
-
|
|
25
|
+
int result = dg_v2(response_body_c, signature_c);
|
|
34
26
|
env->ReleaseStringUTFChars(responseBody, response_body_c);
|
|
35
27
|
env->ReleaseStringUTFChars(signature, signature_c);
|
|
36
|
-
|
|
37
28
|
return result == 1 ? JNI_TRUE : JNI_FALSE;
|
|
38
29
|
}
|
|
30
|
+
|
|
31
|
+
extern "C" JNIEXPORT jint JNICALL
|
|
32
|
+
Java_com_devguard_DevGuardModule_evaluatePolicyNative(
|
|
33
|
+
JNIEnv* env,
|
|
34
|
+
jobject /* this */,
|
|
35
|
+
jint blockEmulators,
|
|
36
|
+
jint isPhysical,
|
|
37
|
+
jint isCompromised) {
|
|
38
|
+
return dg_e1(blockEmulators, isPhysical, isCompromised);
|
|
39
|
+
}
|
|
@@ -17,6 +17,7 @@ class DevGuardModule(reactContext: ReactApplicationContext) : ReactContextBaseJa
|
|
|
17
17
|
|
|
18
18
|
private external fun generateSignatureNative(projectId: String, timestamp: Long): String
|
|
19
19
|
private external fun verifyResponseNative(responseBody: String, signature: String): Boolean
|
|
20
|
+
private external fun evaluatePolicyNative(blockEmulators: Int, isPhysical: Int, isCompromised: Int): Int
|
|
20
21
|
|
|
21
22
|
@ReactMethod
|
|
22
23
|
fun generateSignature(projectId: String, timestamp: Double, promise: Promise) {
|
|
@@ -37,4 +38,18 @@ class DevGuardModule(reactContext: ReactApplicationContext) : ReactContextBaseJa
|
|
|
37
38
|
promise.reject("DEVGUARD_ERROR", "Failed to verify response", e)
|
|
38
39
|
}
|
|
39
40
|
}
|
|
41
|
+
|
|
42
|
+
@ReactMethod
|
|
43
|
+
fun evaluatePolicy(blockEmulators: Boolean, isPhysical: Boolean, isCompromised: Boolean, promise: Promise) {
|
|
44
|
+
try {
|
|
45
|
+
val code = evaluatePolicyNative(
|
|
46
|
+
if (blockEmulators) 1 else 0,
|
|
47
|
+
if (isPhysical) 1 else 0,
|
|
48
|
+
if (isCompromised) 1 else 0,
|
|
49
|
+
)
|
|
50
|
+
promise.resolve(code)
|
|
51
|
+
} catch (e: Exception) {
|
|
52
|
+
promise.reject("DEVGUARD_ERROR", "Failed to evaluate policy", e)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
40
55
|
}
|
package/cpp/devguard_core.c
CHANGED
|
@@ -180,7 +180,7 @@ static void _token_scramble(const char* input, char* output, size_t len) {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
DEVGUARD_EXPORT void
|
|
183
|
+
DEVGUARD_EXPORT void dg_x9(const char* project_id, long long timestamp, char* output) {
|
|
184
184
|
// Validate project_id length to prevent buffer truncation
|
|
185
185
|
size_t pid_len = strlen(project_id);
|
|
186
186
|
if (pid_len == 0 || pid_len > 200) {
|
|
@@ -206,7 +206,7 @@ DEVGUARD_EXPORT void generate_signature(const char* project_id, long long timest
|
|
|
206
206
|
output[64] = '\0';
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
DEVGUARD_EXPORT int
|
|
209
|
+
DEVGUARD_EXPORT int dg_v2(const char* response_body, const char* signature) {
|
|
210
210
|
char secret_key[64];
|
|
211
211
|
_reconstruct_key(secret_key);
|
|
212
212
|
|
|
@@ -226,14 +226,92 @@ DEVGUARD_EXPORT int verify_response(const char* response_body, const char* signa
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
// Secure token scrambling for in-memory protection
|
|
229
|
-
DEVGUARD_EXPORT void
|
|
229
|
+
DEVGUARD_EXPORT void dg_s3(const char* token, char* output) {
|
|
230
230
|
size_t len = strlen(token);
|
|
231
231
|
_token_scramble(token, output, len);
|
|
232
232
|
output[len] = '\0';
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
DEVGUARD_EXPORT void
|
|
235
|
+
DEVGUARD_EXPORT void dg_g4(const char* scrambled, char* output) {
|
|
236
236
|
size_t len = strlen(scrambled);
|
|
237
237
|
_token_scramble(scrambled, output, len);
|
|
238
238
|
output[len] = '\0';
|
|
239
239
|
}
|
|
240
|
+
|
|
241
|
+
// SHA-256 hex digest of an arbitrary UTF-8 string (license keys, fingerprints).
|
|
242
|
+
static void _hash_sha256_hex(const char* input, char* output) {
|
|
243
|
+
if (input == NULL || output == NULL) {
|
|
244
|
+
if (output) output[0] = '\0';
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
uint8_t hash[32];
|
|
249
|
+
SHA256_CTX ctx;
|
|
250
|
+
sha256_init(&ctx);
|
|
251
|
+
sha256_update(&ctx, (const uint8_t*)input, strlen(input));
|
|
252
|
+
sha256_final(&ctx, hash);
|
|
253
|
+
|
|
254
|
+
for (int i = 0; i < 32; i++) {
|
|
255
|
+
sprintf(output + (i * 2), "%02x", hash[i]);
|
|
256
|
+
}
|
|
257
|
+
output[64] = '\0';
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Symmetric XOR transform. output must hold at least input_len bytes.
|
|
261
|
+
DEVGUARD_EXPORT void dg_h5(const char* input, char* output) {
|
|
262
|
+
_hash_sha256_hex(input, output);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
DEVGUARD_EXPORT void dg_x6(
|
|
266
|
+
const char* input,
|
|
267
|
+
size_t input_len,
|
|
268
|
+
const char* key,
|
|
269
|
+
size_t key_len,
|
|
270
|
+
char* output
|
|
271
|
+
) {
|
|
272
|
+
if (input == NULL || key == NULL || output == NULL || key_len == 0) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
for (size_t i = 0; i < input_len; i++) {
|
|
277
|
+
output[i] = input[i] ^ key[i % key_len];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Derive a 64-char hex key from passcode + salt (usage log encryption).
|
|
282
|
+
DEVGUARD_EXPORT void dg_d7(const char* passcode, const char* salt, char* output) {
|
|
283
|
+
char combined[512];
|
|
284
|
+
snprintf(combined, sizeof(combined), "%s_%s",
|
|
285
|
+
passcode != NULL ? passcode : "secure_default",
|
|
286
|
+
salt != NULL ? salt : "salt");
|
|
287
|
+
_hash_sha256_hex(combined, output);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
#if defined(__APPLE__)
|
|
291
|
+
#include <sys/sysctl.h>
|
|
292
|
+
|
|
293
|
+
// Returns total RAM in megabytes on Apple platforms, or -1 on failure.
|
|
294
|
+
DEVGUARD_EXPORT int dg_r8(void) {
|
|
295
|
+
int64_t mem = 0;
|
|
296
|
+
size_t len = sizeof(mem);
|
|
297
|
+
if (sysctlbyname("hw.memsize", &mem, &len, NULL, 0) != 0) {
|
|
298
|
+
return -1;
|
|
299
|
+
}
|
|
300
|
+
return (int)(mem / (1024 * 1024));
|
|
301
|
+
}
|
|
302
|
+
#else
|
|
303
|
+
DEVGUARD_EXPORT int dg_r8(void) {
|
|
304
|
+
return -1;
|
|
305
|
+
}
|
|
306
|
+
#endif
|
|
307
|
+
|
|
308
|
+
// Policy gate: 0=allow, 1=emulator block, 2=compromised device block
|
|
309
|
+
DEVGUARD_EXPORT int dg_e1(int block_emulators, int is_physical, int is_compromised) {
|
|
310
|
+
if (is_compromised) {
|
|
311
|
+
return 2;
|
|
312
|
+
}
|
|
313
|
+
if (block_emulators && !is_physical) {
|
|
314
|
+
return 1;
|
|
315
|
+
}
|
|
316
|
+
return 0;
|
|
317
|
+
}
|
package/cpp/devguard_core.h
CHANGED
|
@@ -14,19 +14,21 @@
|
|
|
14
14
|
extern "C" {
|
|
15
15
|
#endif
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
DEVGUARD_EXPORT void
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
DEVGUARD_EXPORT void
|
|
17
|
+
DEVGUARD_EXPORT void dg_x9(const char* project_id, long long timestamp, char* output);
|
|
18
|
+
DEVGUARD_EXPORT int dg_v2(const char* response_body, const char* signature);
|
|
19
|
+
DEVGUARD_EXPORT void dg_s3(const char* token, char* output);
|
|
20
|
+
DEVGUARD_EXPORT void dg_g4(const char* scrambled, char* output);
|
|
21
|
+
DEVGUARD_EXPORT void dg_h5(const char* input, char* output);
|
|
22
|
+
DEVGUARD_EXPORT void dg_x6(
|
|
23
|
+
const char* input,
|
|
24
|
+
size_t input_len,
|
|
25
|
+
const char* key,
|
|
26
|
+
size_t key_len,
|
|
27
|
+
char* output
|
|
28
|
+
);
|
|
29
|
+
DEVGUARD_EXPORT void dg_d7(const char* passcode, const char* salt, char* output);
|
|
30
|
+
DEVGUARD_EXPORT int dg_r8(void);
|
|
31
|
+
DEVGUARD_EXPORT int dg_e1(int block_emulators, int is_physical, int is_compromised);
|
|
30
32
|
|
|
31
33
|
#ifdef __cplusplus
|
|
32
34
|
}
|
package/ios/DevGuard.mm
CHANGED
|
@@ -13,10 +13,8 @@ RCT_EXPORT_METHOD(generateSignature:(NSString *)projectId
|
|
|
13
13
|
@try {
|
|
14
14
|
const char *project_id_c = [projectId UTF8String];
|
|
15
15
|
long long timestamp_val = [timestamp longLongValue];
|
|
16
|
-
|
|
17
16
|
char output[65];
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
dg_x9(project_id_c, timestamp_val, output);
|
|
20
18
|
NSString *result = [NSString stringWithUTF8String:output];
|
|
21
19
|
resolve(result);
|
|
22
20
|
} @catch (NSException *exception) {
|
|
@@ -32,13 +30,29 @@ RCT_EXPORT_METHOD(verifyResponse:(NSString *)responseBody
|
|
|
32
30
|
@try {
|
|
33
31
|
const char *response_body_c = [responseBody UTF8String];
|
|
34
32
|
const char *signature_c = [signature UTF8String];
|
|
35
|
-
|
|
36
|
-
int isValid = verify_response(response_body_c, signature_c);
|
|
37
|
-
|
|
33
|
+
int isValid = dg_v2(response_body_c, signature_c);
|
|
38
34
|
resolve(@(isValid == 1));
|
|
39
35
|
} @catch (NSException *exception) {
|
|
40
36
|
reject(@"DEVGUARD_ERROR", @"Failed to verify response", nil);
|
|
41
37
|
}
|
|
42
38
|
}
|
|
43
39
|
|
|
40
|
+
RCT_EXPORT_METHOD(evaluatePolicy:(nonnull NSNumber *)blockEmulators
|
|
41
|
+
isPhysical:(nonnull NSNumber *)isPhysical
|
|
42
|
+
isCompromised:(nonnull NSNumber *)isCompromised
|
|
43
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
44
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
45
|
+
{
|
|
46
|
+
@try {
|
|
47
|
+
int code = dg_e1(
|
|
48
|
+
[blockEmulators intValue],
|
|
49
|
+
[isPhysical intValue],
|
|
50
|
+
[isCompromised intValue]
|
|
51
|
+
);
|
|
52
|
+
resolve(@(code));
|
|
53
|
+
} @catch (NSException *exception) {
|
|
54
|
+
reject(@"DEVGUARD_ERROR", @"Failed to evaluate policy", nil);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
@end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { LockScreenBranding } from '../types/branding';
|
|
2
3
|
interface LockScreenProps {
|
|
3
4
|
status: string;
|
|
4
5
|
title?: string;
|
|
@@ -7,6 +8,7 @@ interface LockScreenProps {
|
|
|
7
8
|
contactPhone?: string;
|
|
8
9
|
contactWhatsapp?: string;
|
|
9
10
|
allowUnlock?: boolean;
|
|
11
|
+
branding?: LockScreenBranding | null;
|
|
10
12
|
onUnlock: (key: string) => Promise<boolean>;
|
|
11
13
|
}
|
|
12
14
|
export declare const LockScreen: React.FC<LockScreenProps>;
|