react-native-inapp-inspector 2.5.13 → 2.5.14
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/README.md +0 -8
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/results.bin +1 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/BuildConfig.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView$iconView$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NativeNetworkInspectorSpec.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$Companion.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$activityEventListener$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$frameCallback$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$shakeListener$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorPackage.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/c93e459e24d856bde563ebb048265732/results.bin +1 -0
- package/android/build/.transforms/c93e459e24d856bde563ebb048265732/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/inappinspector/BuildConfig.java +10 -0
- package/android/build/generated/source/codegen/java/com/inappinspector/NativeNetworkInspectorSpec.java +176 -0
- package/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
- package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec-generated.cpp +236 -0
- package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec.h +31 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.cpp +22 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.h +24 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.cpp +16 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.h +17 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.cpp +19 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.h +18 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/RNInAppInspectorSpecJSI.h +337 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.cpp +17 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.h +23 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.cpp +16 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.h +20 -0
- package/android/build/generated/source/codegen/schema.json +1 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +19 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- 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 +1 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_inappinspector_file_paths.xml.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +3 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +28 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +19 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/xml/inappinspector_file_paths.xml +7 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorPackage.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 +2 -0
- 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/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.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 +2 -0
- 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 +35 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorPackage.class +0 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +118 -31
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +1 -1
- package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
- package/dist/commonjs/components/Inspector/DebuggingTab.js +21 -21
- package/dist/commonjs/components/Inspector/FabLauncher.js +3 -3
- package/dist/commonjs/components/Inspector/InspectorHeader.js +30 -30
- package/dist/commonjs/components/Inspector/MainScreen.js +38 -75
- package/dist/commonjs/components/Inspector/NetworkExportModal.js +4 -4
- package/dist/commonjs/components/Inspector/NetworkTab.js +51 -51
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +17 -16
- package/dist/commonjs/components/Inspector/SettingsPanel.js +40 -41
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +34 -3
- package/dist/commonjs/components/Inspector/TabBar.js +9 -15
- package/dist/commonjs/components/Inspector/UiInspectorDetail.js +16 -16
- package/dist/commonjs/components/LogCard.js +7 -7
- package/dist/commonjs/components/SkeletonPlaceholder.d.ts +3 -0
- package/dist/commonjs/components/SkeletonPlaceholder.js +34 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.js +14 -14
- package/dist/commonjs/helpers/uiInspectorEngine.js +9 -9
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +2 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/commonjs/styles/AppFonts.d.ts +4 -0
- package/dist/commonjs/styles/AppFonts.js +1 -1
- package/dist/commonjs/styles/index.d.ts +2 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +0 -2
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +1 -1
- package/dist/esm/components/Inspector/BoxModelVisualizer.js +3 -3
- package/dist/esm/components/Inspector/ConsoleExportModal.js +1 -1
- package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
- package/dist/esm/components/Inspector/DebuggingTab.js +106 -106
- package/dist/esm/components/Inspector/FabLauncher.js +42 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +50 -50
- package/dist/esm/components/Inspector/MainScreen.js +87 -124
- package/dist/esm/components/Inspector/NetworkExportModal.js +1 -1
- package/dist/esm/components/Inspector/NetworkTab.js +83 -83
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +23 -22
- package/dist/esm/components/Inspector/SettingsPanel.js +106 -107
- package/dist/esm/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +42 -11
- package/dist/esm/components/Inspector/TabBar.js +35 -41
- package/dist/esm/components/Inspector/UiA11yAuditPanel.js +4 -4
- package/dist/esm/components/Inspector/UiInspectorDetail.js +141 -141
- package/dist/esm/components/Inspector/UiInspectorOverlay.js +81 -81
- package/dist/esm/components/Inspector/UiInspectorTab.js +10 -10
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +35 -35
- package/dist/esm/components/LogCard.js +53 -53
- package/dist/esm/components/SkeletonPlaceholder.d.ts +3 -0
- package/dist/esm/components/SkeletonPlaceholder.js +42 -11
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/shareFormatter.js +14 -14
- package/dist/esm/helpers/uiInspectorEngine.js +8 -8
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/native/NativeInspector.d.ts +2 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/esm/styles/AppFonts.d.ts +4 -0
- package/dist/esm/styles/AppFonts.js +1 -1
- package/dist/esm/styles/index.d.ts +2 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +0 -2
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +1 -1
- package/ios/NetworkInspectorModule.mm +288 -325
- package/package.json +1 -1
- package/src/native/NativeInspector.ts +30 -0
- package/src/native/NativeNetworkInspector.ts +2 -0
|
@@ -10,8 +10,13 @@
|
|
|
10
10
|
#import <CoreImage/CoreImage.h>
|
|
11
11
|
#import <ImageIO/ImageIO.h>
|
|
12
12
|
#import <MobileCoreServices/MobileCoreServices.h>
|
|
13
|
+
#import <Photos/Photos.h>
|
|
14
|
+
#import <PhotosUI/PhotosUI.h>
|
|
15
|
+
#if __has_include(<UniformTypeIdentifiers/UniformTypeIdentifiers.h>)
|
|
16
|
+
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
|
|
17
|
+
#endif
|
|
13
18
|
|
|
14
|
-
static NetworkInspectorModule *sharedInstance = nil;
|
|
19
|
+
static __weak NetworkInspectorModule *sharedInstance = nil;
|
|
15
20
|
static NSUncaughtExceptionHandler *previousUncaughtExceptionHandler = NULL;
|
|
16
21
|
static BOOL g_floatingButtonPressed = NO;
|
|
17
22
|
|
|
@@ -322,38 +327,8 @@ static BOOL g_floatingButtonPressed = NO;
|
|
|
322
327
|
static InAppInspectorFloatingView *floatingButtonView = nil;
|
|
323
328
|
static BOOL g_floatingButtonDesiredVisible = NO;
|
|
324
329
|
|
|
325
|
-
static void NativeSignalHandler(int signalNumber) {
|
|
326
|
-
void* callstack[128];
|
|
327
|
-
int frames = backtrace(callstack, 128);
|
|
328
|
-
char **strs = backtrace_symbols(callstack, frames);
|
|
329
|
-
|
|
330
|
-
NSMutableArray *backtraceArray = [NSMutableArray arrayWithCapacity:frames];
|
|
331
|
-
for (int i = 0; i < frames; i++) {
|
|
332
|
-
if (strs[i]) {
|
|
333
|
-
[backtraceArray addObject:[NSString stringWithUTF8String:strs[i]]];
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
free(strs);
|
|
337
|
-
|
|
338
|
-
NSString *stackTrace = [backtraceArray componentsJoinedByString:@"\n"];
|
|
339
|
-
NSString *signalName = @"UNKNOWN";
|
|
340
|
-
switch (signalNumber) {
|
|
341
|
-
case SIGABRT: signalName = @"SIGABRT (Abort)"; break;
|
|
342
|
-
case SIGSEGV: signalName = @"SIGSEGV (Segmentation Fault)"; break;
|
|
343
|
-
case SIGBUS: signalName = @"SIGBUS (Bus Error)"; break;
|
|
344
|
-
case SIGILL: signalName = @"SIGILL (Illegal Instruction)"; break;
|
|
345
|
-
case SIGFPE: signalName = @"SIGFPE (Floating Point Exception)"; break;
|
|
346
|
-
case SIGPIPE: signalName = @"SIGPIPE (Broken Pipe)"; break;
|
|
347
|
-
case SIGTRAP: signalName = @"SIGTRAP (Trace Trap)"; break;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
NSString *message = [NSString stringWithFormat:@"Native Signal Crash: %@", signalName];
|
|
351
|
-
if (sharedInstance != nil) {
|
|
352
|
-
[sharedInstance emitCrashEventWithMessage:message stackTrace:stackTrace];
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
330
|
static void NativeExceptionHandler(NSException *exception) {
|
|
331
|
+
if (!exception) return;
|
|
357
332
|
NSArray *callStack = [exception callStackSymbols];
|
|
358
333
|
NSString *stackTrace = [callStack componentsJoinedByString:@"\n"];
|
|
359
334
|
NSString *message = [NSString stringWithFormat:@"%@: %@", [exception name], [exception reason]];
|
|
@@ -362,131 +337,35 @@ static void NativeExceptionHandler(NSException *exception) {
|
|
|
362
337
|
[sharedInstance emitCrashEventWithMessage:message stackTrace:stackTrace];
|
|
363
338
|
}
|
|
364
339
|
|
|
365
|
-
//
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
340
|
+
// Save crash record to local cache directory synchronously for persistent debugging
|
|
341
|
+
@try {
|
|
342
|
+
NSString *cacheDir = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
|
|
343
|
+
NSString *crashDir = [cacheDir stringByAppendingPathComponent:@"inspector_captures"];
|
|
344
|
+
[[NSFileManager defaultManager] createDirectoryAtPath:crashDir withIntermediateDirectories:YES attributes:nil error:nil];
|
|
345
|
+
NSString *crashFile = [crashDir stringByAppendingPathComponent:@"last_native_crash.json"];
|
|
346
|
+
NSDictionary *crashDict = @{
|
|
347
|
+
@"platform": @"ios",
|
|
348
|
+
@"message": message ?: @"Unknown iOS Exception",
|
|
349
|
+
@"name": [exception name] ?: @"NSException",
|
|
350
|
+
@"reason": [exception reason] ?: @"",
|
|
351
|
+
@"stack": stackTrace ?: @"",
|
|
352
|
+
@"timestamp": @([[NSDate date] timeIntervalSince1970] * 1000)
|
|
353
|
+
};
|
|
354
|
+
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:crashDict options:NSJSONWritingPrettyPrinted error:nil];
|
|
355
|
+
[jsonData writeToFile:crashFile atomically:YES];
|
|
356
|
+
} @catch (NSException *e) {}
|
|
380
357
|
|
|
381
|
-
// Delegate to
|
|
382
|
-
if (previousUncaughtExceptionHandler) {
|
|
358
|
+
// Delegate to previous exception handler (React Native / Crashlytics / default)
|
|
359
|
+
if (previousUncaughtExceptionHandler && previousUncaughtExceptionHandler != &NativeExceptionHandler) {
|
|
383
360
|
previousUncaughtExceptionHandler(exception);
|
|
384
361
|
}
|
|
385
362
|
}
|
|
386
363
|
|
|
387
|
-
// ─── Fabric View Recycle Safeguard ───────────────────────────────────────────
|
|
388
|
-
// Custom NSAssertionHandler that catches the specific Fabric view recycling
|
|
389
|
-
// assertion ('Attempt to recycle a mounted view') and logs it as a warning
|
|
390
|
-
// instead of crashing. This prevents third-party native views (like
|
|
391
|
-
// BVLinearGradient from react-native-linear-gradient) from causing fatal
|
|
392
|
-
// assertion failures when Fabric's view recycler encounters views whose
|
|
393
|
-
// superview is still attached during conditional unmounting.
|
|
394
|
-
|
|
395
|
-
@interface InAppInspectorAssertionHandler : NSAssertionHandler
|
|
396
|
-
@property (nonatomic, strong) NSAssertionHandler *previousHandler;
|
|
397
|
-
@end
|
|
398
|
-
|
|
399
|
-
@implementation InAppInspectorAssertionHandler
|
|
400
|
-
|
|
401
|
-
+ (void)install {
|
|
402
|
-
NSThread *mainThread = [NSThread mainThread];
|
|
403
|
-
NSMutableDictionary *threadDict = [mainThread threadDictionary];
|
|
404
|
-
NSAssertionHandler *current = threadDict[NSAssertionHandlerKey];
|
|
405
|
-
|
|
406
|
-
InAppInspectorAssertionHandler *handler = [[InAppInspectorAssertionHandler alloc] init];
|
|
407
|
-
handler.previousHandler = current;
|
|
408
|
-
threadDict[NSAssertionHandlerKey] = handler;
|
|
409
|
-
NSLog(@"[InAppInspector] Fabric view recycle safeguard (assertion handler) installed");
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
- (void)handleFailureInMethod:(SEL)selector
|
|
413
|
-
object:(id)object
|
|
414
|
-
file:(NSString *)fileName
|
|
415
|
-
lineNumber:(NSInteger)line
|
|
416
|
-
description:(NSString *)format, ... {
|
|
417
|
-
va_list args;
|
|
418
|
-
va_start(args, format);
|
|
419
|
-
NSString *desc = [[NSString alloc] initWithFormat:format arguments:args];
|
|
420
|
-
va_end(args);
|
|
421
|
-
|
|
422
|
-
// Intercept the specific Fabric recycle assertion
|
|
423
|
-
if ([desc containsString:@"Attempt to recycle a mounted view"]) {
|
|
424
|
-
NSLog(@"[InAppInspector] ⚠️ Suppressed Fabric view recycle assertion: %@ (in %@:%ld)",
|
|
425
|
-
desc, fileName, (long)line);
|
|
426
|
-
return; // Suppress — don't crash
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
// Forward all other assertions to the previous handler
|
|
430
|
-
if (self.previousHandler) {
|
|
431
|
-
va_start(args, format);
|
|
432
|
-
[self.previousHandler handleFailureInMethod:selector
|
|
433
|
-
object:object
|
|
434
|
-
file:fileName
|
|
435
|
-
lineNumber:line
|
|
436
|
-
description:@"%@", desc];
|
|
437
|
-
va_end(args);
|
|
438
|
-
} else {
|
|
439
|
-
// No previous handler — raise as exception (default behavior)
|
|
440
|
-
NSString *reason = [NSString stringWithFormat:
|
|
441
|
-
@"*** Assertion failure in %@, %@:%ld: %@",
|
|
442
|
-
NSStringFromSelector(selector), fileName, (long)line, desc];
|
|
443
|
-
@throw [NSException exceptionWithName:NSInternalInconsistencyException
|
|
444
|
-
reason:reason
|
|
445
|
-
userInfo:nil];
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
- (void)handleFailureInFunction:(NSString *)functionName
|
|
450
|
-
file:(NSString *)fileName
|
|
451
|
-
lineNumber:(NSInteger)line
|
|
452
|
-
description:(NSString *)format, ... {
|
|
453
|
-
va_list args;
|
|
454
|
-
va_start(args, format);
|
|
455
|
-
NSString *desc = [[NSString alloc] initWithFormat:format arguments:args];
|
|
456
|
-
va_end(args);
|
|
457
|
-
|
|
458
|
-
// Intercept the specific Fabric recycle assertion
|
|
459
|
-
if ([desc containsString:@"Attempt to recycle a mounted view"]) {
|
|
460
|
-
NSLog(@"[InAppInspector] ⚠️ Suppressed Fabric view recycle assertion: %@ (in %@:%ld)",
|
|
461
|
-
desc, fileName, (long)line);
|
|
462
|
-
return; // Suppress — don't crash
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
// Forward all other assertions to the previous handler
|
|
466
|
-
if (self.previousHandler) {
|
|
467
|
-
va_start(args, format);
|
|
468
|
-
[self.previousHandler handleFailureInFunction:functionName
|
|
469
|
-
file:fileName
|
|
470
|
-
lineNumber:line
|
|
471
|
-
description:@"%@", desc];
|
|
472
|
-
va_end(args);
|
|
473
|
-
} else {
|
|
474
|
-
NSString *reason = [NSString stringWithFormat:
|
|
475
|
-
@"*** Assertion failure in %@, %@:%ld: %@",
|
|
476
|
-
functionName, fileName, (long)line, desc];
|
|
477
|
-
@throw [NSException exceptionWithName:NSInternalInconsistencyException
|
|
478
|
-
reason:reason
|
|
479
|
-
userInfo:nil];
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
@end
|
|
484
|
-
|
|
485
364
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
486
365
|
// NATIVE CAMERA ROLL / PHOTO & VIDEO PICKER DELEGATE
|
|
487
366
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
488
367
|
|
|
489
|
-
@interface InAppInspectorPickerDelegate : NSObject <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
|
|
368
|
+
@interface InAppInspectorPickerDelegate : NSObject <PHPickerViewControllerDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate>
|
|
490
369
|
@property (nonatomic, copy) RCTPromiseResolveBlock resolve;
|
|
491
370
|
@property (nonatomic, copy) RCTPromiseRejectBlock reject;
|
|
492
371
|
@property (nonatomic, copy) NSString *capturesDirectory;
|
|
@@ -494,18 +373,18 @@ static void NativeExceptionHandler(NSException *exception) {
|
|
|
494
373
|
|
|
495
374
|
@implementation InAppInspectorPickerDelegate
|
|
496
375
|
|
|
497
|
-
- (void)picker:(
|
|
376
|
+
- (void)picker:(PHPickerViewController *)picker didFinishPicking:(NSArray<PHPickerResult *> *)results API_AVAILABLE(ios(14.0)) {
|
|
498
377
|
[picker dismissViewControllerAnimated:YES completion:nil];
|
|
499
378
|
if (results.count == 0) {
|
|
500
379
|
if (self.resolve) self.resolve([NSNull null]);
|
|
501
380
|
return;
|
|
502
381
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
NSItemProvider *provider =
|
|
382
|
+
|
|
383
|
+
PHPickerResult *result = results.firstObject;
|
|
384
|
+
NSItemProvider *provider = result.itemProvider;
|
|
506
385
|
long long timestamp = (long long)([[NSDate date] timeIntervalSince1970] * 1000.0);
|
|
507
386
|
NSString *randomStr = [NSString stringWithFormat:@"%04d", arc4random_uniform(10000)];
|
|
508
|
-
|
|
387
|
+
|
|
509
388
|
if ([provider hasItemConformingToTypeIdentifier:@"public.movie"]) {
|
|
510
389
|
[provider loadFileRepresentationForTypeIdentifier:@"public.movie" completionHandler:^(NSURL * _Nullable url, NSError * _Nullable error) {
|
|
511
390
|
if (error || !url) {
|
|
@@ -516,13 +395,13 @@ static void NativeExceptionHandler(NSException *exception) {
|
|
|
516
395
|
if (ext.length == 0) ext = @"mp4";
|
|
517
396
|
NSString *filename = [NSString stringWithFormat:@"rn_iai_%lld_imported_%@.%@", timestamp, randomStr, ext];
|
|
518
397
|
NSString *destPath = [self.capturesDirectory stringByAppendingPathComponent:filename];
|
|
519
|
-
|
|
398
|
+
|
|
520
399
|
[[NSFileManager defaultManager] removeItemAtPath:destPath error:nil];
|
|
521
400
|
[[NSFileManager defaultManager] copyItemAtURL:url toURL:[NSURL fileURLWithPath:destPath] error:nil];
|
|
522
|
-
|
|
401
|
+
|
|
523
402
|
NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:destPath error:nil];
|
|
524
403
|
long long sizeBytes = [attrs fileSize];
|
|
525
|
-
|
|
404
|
+
|
|
526
405
|
NSMutableDictionary *map = [NSMutableDictionary dictionaryWithDictionary:@{
|
|
527
406
|
@"id": filename,
|
|
528
407
|
@"type": @"video",
|
|
@@ -532,7 +411,7 @@ static void NativeExceptionHandler(NSException *exception) {
|
|
|
532
411
|
@"sizeBytes": @(sizeBytes),
|
|
533
412
|
@"timestamp": @(timestamp)
|
|
534
413
|
}];
|
|
535
|
-
|
|
414
|
+
|
|
536
415
|
@try {
|
|
537
416
|
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:[NSURL fileURLWithPath:destPath] options:nil];
|
|
538
417
|
AVAssetImageGenerator *gen = [[AVAssetImageGenerator alloc] initWithAsset:asset];
|
|
@@ -548,7 +427,7 @@ static void NativeExceptionHandler(NSException *exception) {
|
|
|
548
427
|
map[@"thumbnailUri"] = [NSURL fileURLWithPath:thumbPath].absoluteString;
|
|
549
428
|
}
|
|
550
429
|
} @catch (id ex) {}
|
|
551
|
-
|
|
430
|
+
|
|
552
431
|
if (self.resolve) self.resolve(map);
|
|
553
432
|
}];
|
|
554
433
|
} else {
|
|
@@ -559,12 +438,12 @@ static void NativeExceptionHandler(NSException *exception) {
|
|
|
559
438
|
NSString *type = [ext isEqualToString:@"gif"] ? @"gif" : @"image";
|
|
560
439
|
NSString *filename = [NSString stringWithFormat:@"rn_iai_%lld_imported_%@.%@", timestamp, randomStr, ext];
|
|
561
440
|
NSString *destPath = [self.capturesDirectory stringByAppendingPathComponent:filename];
|
|
562
|
-
|
|
441
|
+
|
|
563
442
|
[[NSFileManager defaultManager] removeItemAtPath:destPath error:nil];
|
|
564
443
|
[[NSFileManager defaultManager] copyItemAtURL:url toURL:[NSURL fileURLWithPath:destPath] error:nil];
|
|
565
444
|
NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:destPath error:nil];
|
|
566
445
|
long long sizeBytes = [attrs fileSize];
|
|
567
|
-
|
|
446
|
+
|
|
568
447
|
NSDictionary *map = @{
|
|
569
448
|
@"id": filename,
|
|
570
449
|
@"type": type,
|
|
@@ -583,10 +462,10 @@ static void NativeExceptionHandler(NSException *exception) {
|
|
|
583
462
|
NSString *filename = [NSString stringWithFormat:@"rn_iai_%lld_imported_%@.jpg", timestamp, randomStr];
|
|
584
463
|
NSString *destPath = [self.capturesDirectory stringByAppendingPathComponent:filename];
|
|
585
464
|
[data writeToFile:destPath atomically:YES];
|
|
586
|
-
|
|
465
|
+
|
|
587
466
|
NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:destPath error:nil];
|
|
588
467
|
long long sizeBytes = [attrs fileSize];
|
|
589
|
-
|
|
468
|
+
|
|
590
469
|
NSDictionary *map = @{
|
|
591
470
|
@"id": filename,
|
|
592
471
|
@"type": @"image",
|
|
@@ -620,6 +499,139 @@ static void NativeExceptionHandler(NSException *exception) {
|
|
|
620
499
|
|
|
621
500
|
static InAppInspectorPickerDelegate *g_pickerDelegate = nil;
|
|
622
501
|
|
|
502
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
503
|
+
// SAFE WINDOW & VIEW CONTROLLER HELPERS (iOS 13 - 18+)
|
|
504
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
505
|
+
|
|
506
|
+
static BOOL IsInternalSystemWindow(UIWindow *w) {
|
|
507
|
+
if (!w) return YES;
|
|
508
|
+
NSString *className = NSStringFromClass([w class]);
|
|
509
|
+
if ([className hasPrefix:@"_"] ||
|
|
510
|
+
[className containsString:@"Keyboard"] ||
|
|
511
|
+
[className containsString:@"TextEffect"] ||
|
|
512
|
+
[className containsString:@"StatusBar"] ||
|
|
513
|
+
[className containsString:@"InputSet"] ||
|
|
514
|
+
[className containsString:@"TrackingWindow"]) {
|
|
515
|
+
return YES;
|
|
516
|
+
}
|
|
517
|
+
return NO;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
static UIWindow *GetAppActiveWindow(void) {
|
|
521
|
+
if (@available(iOS 13.0, *)) {
|
|
522
|
+
// Priority 1: Foreground Active Scene with Key Window
|
|
523
|
+
for (UIScene *scene in [UIApplication sharedApplication].connectedScenes) {
|
|
524
|
+
if ([scene isKindOfClass:[UIWindowScene class]] && scene.activationState == UISceneActivationStateForegroundActive) {
|
|
525
|
+
UIWindowScene *ws = (UIWindowScene *)scene;
|
|
526
|
+
for (UIWindow *w in ws.windows) {
|
|
527
|
+
if (w.isKeyWindow && !w.hidden && w.alpha > 0.01 && !IsInternalSystemWindow(w)) {
|
|
528
|
+
return w;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
for (UIWindow *w in ws.windows) {
|
|
532
|
+
if (w.windowLevel == UIWindowLevelNormal && !w.hidden && w.alpha > 0.01 && !IsInternalSystemWindow(w)) {
|
|
533
|
+
return w;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
// Priority 2: Any Scene with usable window
|
|
539
|
+
for (UIScene *scene in [UIApplication sharedApplication].connectedScenes) {
|
|
540
|
+
if ([scene isKindOfClass:[UIWindowScene class]]) {
|
|
541
|
+
UIWindowScene *ws = (UIWindowScene *)scene;
|
|
542
|
+
for (UIWindow *w in ws.windows) {
|
|
543
|
+
if (!w.hidden && w.alpha > 0.01 && !IsInternalSystemWindow(w) && (w.isKeyWindow || w.windowLevel == UIWindowLevelNormal)) {
|
|
544
|
+
return w;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
if (ws.windows.count > 0 && !IsInternalSystemWindow(ws.windows.firstObject)) {
|
|
548
|
+
return ws.windows.firstObject;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
#pragma clang diagnostic push
|
|
554
|
+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
555
|
+
for (UIWindow *w in [UIApplication sharedApplication].windows) {
|
|
556
|
+
if (!IsInternalSystemWindow(w) && (w.isKeyWindow || w.windowLevel == UIWindowLevelNormal)) {
|
|
557
|
+
return w;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
return [UIApplication sharedApplication].windows.firstObject;
|
|
561
|
+
#pragma clang diagnostic pop
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
static UIViewController *FindTopViewControllerFrom(UIViewController *vc) {
|
|
565
|
+
if (!vc) return nil;
|
|
566
|
+
if ([vc isKindOfClass:[UINavigationController class]]) {
|
|
567
|
+
UIViewController *visible = [(UINavigationController *)vc visibleViewController];
|
|
568
|
+
return visible ? FindTopViewControllerFrom(visible) : vc;
|
|
569
|
+
}
|
|
570
|
+
if ([vc isKindOfClass:[UITabBarController class]]) {
|
|
571
|
+
UIViewController *selected = [(UITabBarController *)vc selectedViewController];
|
|
572
|
+
return selected ? FindTopViewControllerFrom(selected) : vc;
|
|
573
|
+
}
|
|
574
|
+
if (vc.presentedViewController && !vc.presentedViewController.isBeingDismissed) {
|
|
575
|
+
return FindTopViewControllerFrom(vc.presentedViewController);
|
|
576
|
+
}
|
|
577
|
+
return vc;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
static UIViewController *GetTopViewController(void) {
|
|
581
|
+
UIWindow *win = GetAppActiveWindow();
|
|
582
|
+
UIViewController *root = win ? win.rootViewController : nil;
|
|
583
|
+
if (!root) {
|
|
584
|
+
if ([[UIApplication sharedApplication].delegate respondsToSelector:@selector(window)]) {
|
|
585
|
+
root = [UIApplication sharedApplication].delegate.window.rootViewController;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return root ? FindTopViewControllerFrom(root) : nil;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
static CGRect GetAppScreenBounds(void) {
|
|
592
|
+
UIWindow *w = GetAppActiveWindow();
|
|
593
|
+
if (w && w.bounds.size.width > 0 && w.bounds.size.height > 0) {
|
|
594
|
+
return w.bounds;
|
|
595
|
+
}
|
|
596
|
+
if (@available(iOS 13.0, *)) {
|
|
597
|
+
for (UIScene *scene in [UIApplication sharedApplication].connectedScenes) {
|
|
598
|
+
if ([scene isKindOfClass:[UIWindowScene class]]) {
|
|
599
|
+
UIWindowScene *ws = (UIWindowScene *)scene;
|
|
600
|
+
if (ws.coordinateSpace.bounds.size.width > 0 && ws.coordinateSpace.bounds.size.height > 0) {
|
|
601
|
+
return ws.coordinateSpace.bounds;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
#pragma clang diagnostic push
|
|
607
|
+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
608
|
+
CGRect b = [UIScreen mainScreen].bounds;
|
|
609
|
+
if (b.size.width > 0 && b.size.height > 0) return b;
|
|
610
|
+
#pragma clang diagnostic pop
|
|
611
|
+
return CGRectMake(0, 0, 393, 852);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
static CGFloat GetAppScreenScale(void) {
|
|
615
|
+
UIWindow *w = GetAppActiveWindow();
|
|
616
|
+
if (w && w.screen) {
|
|
617
|
+
return w.screen.scale;
|
|
618
|
+
}
|
|
619
|
+
if (@available(iOS 13.0, *)) {
|
|
620
|
+
for (UIScene *scene in [UIApplication sharedApplication].connectedScenes) {
|
|
621
|
+
if ([scene isKindOfClass:[UIWindowScene class]]) {
|
|
622
|
+
UIWindowScene *ws = (UIWindowScene *)scene;
|
|
623
|
+
if (ws.screen) {
|
|
624
|
+
return ws.screen.scale;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
#pragma clang diagnostic push
|
|
630
|
+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
631
|
+
return [UIScreen mainScreen].scale > 0 ? [UIScreen mainScreen].scale : 2.0;
|
|
632
|
+
#pragma clang diagnostic pop
|
|
633
|
+
}
|
|
634
|
+
|
|
623
635
|
@implementation NetworkInspectorModule {
|
|
624
636
|
bool hasListeners;
|
|
625
637
|
CADisplayLink *displayLink;
|
|
@@ -675,6 +687,17 @@ RCT_EXPORT_MODULE(NetworkInspectorModule);
|
|
|
675
687
|
return self;
|
|
676
688
|
}
|
|
677
689
|
|
|
690
|
+
- (void)dealloc {
|
|
691
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
692
|
+
if (self->displayLink) {
|
|
693
|
+
[self->displayLink invalidate];
|
|
694
|
+
self->displayLink = nil;
|
|
695
|
+
}
|
|
696
|
+
if (sharedInstance == self) {
|
|
697
|
+
sharedInstance = nil;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
678
701
|
+ (BOOL)requiresMainQueueSetup {
|
|
679
702
|
return YES;
|
|
680
703
|
}
|
|
@@ -696,7 +719,6 @@ RCT_EXPORT_MODULE(NetworkInspectorModule);
|
|
|
696
719
|
|
|
697
720
|
- (void)safeSendEvent:(NSString *)eventName body:(id)body {
|
|
698
721
|
if (!hasListeners) return;
|
|
699
|
-
if (self.bridge == nil) return;
|
|
700
722
|
@try {
|
|
701
723
|
[self sendEventWithName:eventName body:body];
|
|
702
724
|
} @catch (NSException *ex) {
|
|
@@ -721,33 +743,13 @@ RCT_EXPORT_MODULE(NetworkInspectorModule);
|
|
|
721
743
|
}
|
|
722
744
|
|
|
723
745
|
- (void)installHandlers {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
sigaction(SIGABRT, &sa, NULL);
|
|
733
|
-
sigaction(SIGSEGV, &sa, NULL);
|
|
734
|
-
sigaction(SIGBUS, &sa, NULL);
|
|
735
|
-
sigaction(SIGILL, &sa, NULL);
|
|
736
|
-
sigaction(SIGFPE, &sa, NULL);
|
|
737
|
-
sigaction(SIGPIPE, &sa, NULL);
|
|
738
|
-
sigaction(SIGTRAP, &sa, NULL);
|
|
739
|
-
|
|
740
|
-
// Fabric view recycle safeguard: Install a custom NSAssertionHandler on the
|
|
741
|
-
// main thread that catches the specific 'Attempt to recycle a mounted view'
|
|
742
|
-
// assertion from RCTComponentViewRegistry, instead of crashing the app.
|
|
743
|
-
// This is a defense-in-depth approach — the primary fix is on the JS side
|
|
744
|
-
// (using LinearGradient as absolute background, not as a container parent).
|
|
745
|
-
static dispatch_once_t onceToken;
|
|
746
|
-
dispatch_once(&onceToken, ^{
|
|
747
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
748
|
-
[InAppInspectorAssertionHandler install];
|
|
749
|
-
});
|
|
750
|
-
});
|
|
746
|
+
@try {
|
|
747
|
+
if (!previousUncaughtExceptionHandler) {
|
|
748
|
+
previousUncaughtExceptionHandler = NSGetUncaughtExceptionHandler();
|
|
749
|
+
NSSetUncaughtExceptionHandler(&NativeExceptionHandler);
|
|
750
|
+
}
|
|
751
|
+
signal(SIGPIPE, SIG_IGN);
|
|
752
|
+
} @catch (NSException *e) {}
|
|
751
753
|
}
|
|
752
754
|
|
|
753
755
|
- (void)emitCrashEventWithMessage:(NSString *)message stackTrace:(NSString *)stackTrace {
|
|
@@ -766,6 +768,41 @@ RCT_EXPORT_METHOD(enableNativeCrashProtection:(RCTPromiseResolveBlock)resolve
|
|
|
766
768
|
resolve(@(YES));
|
|
767
769
|
}
|
|
768
770
|
|
|
771
|
+
RCT_EXPORT_METHOD(getLastNativeCrash:(RCTPromiseResolveBlock)resolve
|
|
772
|
+
reject:(RCTPromiseRejectBlock)reject) {
|
|
773
|
+
@try {
|
|
774
|
+
NSString *cacheDir = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
|
|
775
|
+
NSString *crashFile = [[cacheDir stringByAppendingPathComponent:@"inspector_captures"] stringByAppendingPathComponent:@"last_native_crash.json"];
|
|
776
|
+
if ([[NSFileManager defaultManager] fileExistsAtPath:crashFile]) {
|
|
777
|
+
NSData *data = [NSData dataWithContentsOfFile:crashFile];
|
|
778
|
+
if (data) {
|
|
779
|
+
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
|
|
780
|
+
if (json) {
|
|
781
|
+
resolve(json);
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
resolve([NSNull null]);
|
|
787
|
+
} @catch (NSException *e) {
|
|
788
|
+
reject(@"GET_CRASH_ERROR", e.reason, nil);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
RCT_EXPORT_METHOD(clearLastNativeCrash:(RCTPromiseResolveBlock)resolve
|
|
793
|
+
reject:(RCTPromiseRejectBlock)reject) {
|
|
794
|
+
@try {
|
|
795
|
+
NSString *cacheDir = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
|
|
796
|
+
NSString *crashFile = [[cacheDir stringByAppendingPathComponent:@"inspector_captures"] stringByAppendingPathComponent:@"last_native_crash.json"];
|
|
797
|
+
if ([[NSFileManager defaultManager] fileExistsAtPath:crashFile]) {
|
|
798
|
+
[[NSFileManager defaultManager] removeItemAtPath:crashFile error:nil];
|
|
799
|
+
}
|
|
800
|
+
resolve(@(YES));
|
|
801
|
+
} @catch (NSException *e) {
|
|
802
|
+
reject(@"CLEAR_CRASH_ERROR", e.reason, nil);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
769
806
|
RCT_EXPORT_METHOD(getDeviceMetrics:(RCTPromiseResolveBlock)resolve
|
|
770
807
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
771
808
|
NSMutableDictionary *metrics = [NSMutableDictionary dictionary];
|
|
@@ -837,42 +874,15 @@ RCT_EXPORT_METHOD(getDeviceMetrics:(RCTPromiseResolveBlock)resolve
|
|
|
837
874
|
resolve(metrics);
|
|
838
875
|
}
|
|
839
876
|
|
|
840
|
-
static UIWindow *GetAppActiveWindow(void) {
|
|
841
|
-
if (@available(iOS 13.0, *)) {
|
|
842
|
-
for (UIScene *scene in [UIApplication sharedApplication].connectedScenes) {
|
|
843
|
-
if ([scene isKindOfClass:[UIWindowScene class]]) {
|
|
844
|
-
UIWindowScene *ws = (UIWindowScene *)scene;
|
|
845
|
-
for (UIWindow *w in ws.windows) {
|
|
846
|
-
if (w.isKeyWindow || w.windowLevel == UIWindowLevelNormal) {
|
|
847
|
-
return w;
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
if (ws.windows.count > 0) {
|
|
851
|
-
return ws.windows.firstObject;
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
for (UIWindow *w in [UIApplication sharedApplication].windows) {
|
|
857
|
-
if (w.isKeyWindow || w.windowLevel == UIWindowLevelNormal) {
|
|
858
|
-
return w;
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
return [UIApplication sharedApplication].windows.firstObject;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
877
|
RCT_EXPORT_METHOD(showFloatingButton:(NSDictionary *)options
|
|
865
878
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
866
879
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
867
880
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
868
881
|
g_floatingButtonDesiredVisible = YES;
|
|
869
|
-
|
|
870
|
-
CGRect screenBounds = targetWindow ? targetWindow.bounds : [UIScreen mainScreen].bounds;
|
|
882
|
+
CGRect screenBounds = GetAppScreenBounds();
|
|
871
883
|
|
|
872
|
-
CGFloat screenWidth = screenBounds.size.width > 0 ? screenBounds.size.width :
|
|
873
|
-
|
|
874
|
-
CGFloat screenHeight = screenBounds.size.height > 0 ? screenBounds.size.height : [UIScreen mainScreen].bounds.size.height;
|
|
875
|
-
if (screenHeight <= 0) screenHeight = 852.0;
|
|
884
|
+
CGFloat screenWidth = screenBounds.size.width > 0 ? screenBounds.size.width : 393.0;
|
|
885
|
+
CGFloat screenHeight = screenBounds.size.height > 0 ? screenBounds.size.height : 852.0;
|
|
876
886
|
|
|
877
887
|
CGFloat size = 64.0;
|
|
878
888
|
if (options && options[@"size"]) {
|
|
@@ -1271,32 +1281,7 @@ RCT_EXPORT_METHOD(getNativeCachedPage:(NSString *)pageKey
|
|
|
1271
1281
|
}
|
|
1272
1282
|
|
|
1273
1283
|
- (UIWindow *)findActiveKeyWindow {
|
|
1274
|
-
|
|
1275
|
-
if (@available(iOS 13.0, *)) {
|
|
1276
|
-
for (UIScene *scene in [UIApplication sharedApplication].connectedScenes) {
|
|
1277
|
-
if ([scene isKindOfClass:[UIWindowScene class]]) {
|
|
1278
|
-
UIWindowScene *windowScene = (UIWindowScene *)scene;
|
|
1279
|
-
for (UIWindow *w in windowScene.windows) {
|
|
1280
|
-
if (w.isKeyWindow) {
|
|
1281
|
-
return w;
|
|
1282
|
-
}
|
|
1283
|
-
if (!foundWindow && !w.hidden && w.alpha > 0.01) {
|
|
1284
|
-
foundWindow = w;
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
if (!foundWindow) {
|
|
1291
|
-
#pragma clang diagnostic push
|
|
1292
|
-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
1293
|
-
foundWindow = [UIApplication sharedApplication].keyWindow;
|
|
1294
|
-
if (!foundWindow && [UIApplication sharedApplication].windows.count > 0) {
|
|
1295
|
-
foundWindow = [UIApplication sharedApplication].windows.firstObject;
|
|
1296
|
-
}
|
|
1297
|
-
#pragma clang diagnostic pop
|
|
1298
|
-
}
|
|
1299
|
-
return foundWindow;
|
|
1284
|
+
return GetAppActiveWindow();
|
|
1300
1285
|
}
|
|
1301
1286
|
|
|
1302
1287
|
- (UIImage *)captureScreenHierarchyWithScale:(CGFloat)scale {
|
|
@@ -1305,10 +1290,13 @@ RCT_EXPORT_METHOD(getNativeCachedPage:(NSString *)pageKey
|
|
|
1305
1290
|
return nil;
|
|
1306
1291
|
}
|
|
1307
1292
|
|
|
1308
|
-
CGRect screenBounds =
|
|
1309
|
-
CGFloat screenScale =
|
|
1293
|
+
CGRect screenBounds = GetAppScreenBounds();
|
|
1294
|
+
CGFloat screenScale = GetAppScreenScale();
|
|
1310
1295
|
CGFloat finalScale = screenScale * scale;
|
|
1311
1296
|
if (finalScale <= 0.0) finalScale = screenScale;
|
|
1297
|
+
if (screenBounds.size.width <= 0 || screenBounds.size.height <= 0) {
|
|
1298
|
+
screenBounds = CGRectMake(0, 0, 393, 852);
|
|
1299
|
+
}
|
|
1312
1300
|
|
|
1313
1301
|
UIGraphicsBeginImageContextWithOptions(screenBounds.size, NO, finalScale);
|
|
1314
1302
|
CGContextRef context = UIGraphicsGetCurrentContext();
|
|
@@ -1338,7 +1326,7 @@ RCT_EXPORT_METHOD(getNativeCachedPage:(NSString *)pageKey
|
|
|
1338
1326
|
|
|
1339
1327
|
BOOL drewAny = NO;
|
|
1340
1328
|
for (UIWindow *w in sortedWindows) {
|
|
1341
|
-
if (w.hidden || w.alpha <= 0.01 || w.bounds.size.width <= 0) continue;
|
|
1329
|
+
if (w.hidden || w.alpha <= 0.01 || w.bounds.size.width <= 0 || IsInternalSystemWindow(w)) continue;
|
|
1342
1330
|
@try {
|
|
1343
1331
|
BOOL ok = [w drawViewHierarchyInRect:w.bounds afterScreenUpdates:NO];
|
|
1344
1332
|
if (ok) {
|
|
@@ -1422,8 +1410,8 @@ RCT_EXPORT_METHOD(getNativeCachedPage:(NSString *)pageKey
|
|
|
1422
1410
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
1423
1411
|
reject:(RCTPromiseRejectBlock)reject {
|
|
1424
1412
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
1425
|
-
CGRect bounds =
|
|
1426
|
-
CGFloat screenScale =
|
|
1413
|
+
CGRect bounds = GetAppScreenBounds();
|
|
1414
|
+
CGFloat screenScale = GetAppScreenScale();
|
|
1427
1415
|
double scaleParam = [options[@"scale"] doubleValue];
|
|
1428
1416
|
if (scaleParam <= 0.0 || scaleParam > 1.0) {
|
|
1429
1417
|
scaleParam = 0.5;
|
|
@@ -1764,15 +1752,7 @@ RCT_EXPORT_METHOD(playVideo:(NSString *)videoUri
|
|
|
1764
1752
|
playerController.showsPlaybackControls = YES;
|
|
1765
1753
|
playerController.modalPresentationStyle = UIModalPresentationFullScreen;
|
|
1766
1754
|
|
|
1767
|
-
|
|
1768
|
-
UIViewController *rootVC = keyWindow.rootViewController;
|
|
1769
|
-
if (!rootVC) {
|
|
1770
|
-
rootVC = [UIApplication sharedApplication].delegate.window.rootViewController;
|
|
1771
|
-
}
|
|
1772
|
-
while (rootVC.presentedViewController) {
|
|
1773
|
-
rootVC = rootVC.presentedViewController;
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1755
|
+
UIViewController *rootVC = GetTopViewController();
|
|
1776
1756
|
if (rootVC) {
|
|
1777
1757
|
[rootVC presentViewController:playerController animated:YES completion:^{
|
|
1778
1758
|
[player play];
|
|
@@ -1825,7 +1805,7 @@ RCT_EXPORT_METHOD(convertToGif:(NSString *)videoUri
|
|
|
1825
1805
|
NSString *filePath = [[self getCapturesDirectory] stringByAppendingPathComponent:filename];
|
|
1826
1806
|
NSURL *gifUrl = [NSURL fileURLWithPath:filePath];
|
|
1827
1807
|
|
|
1828
|
-
CGImageDestinationRef destination = CGImageDestinationCreateWithURL((__bridge CFURLRef)gifUrl,
|
|
1808
|
+
CGImageDestinationRef destination = CGImageDestinationCreateWithURL((__bridge CFURLRef)gifUrl, (CFStringRef)@"com.compuserve.gif", 0, NULL);
|
|
1829
1809
|
if (!destination) {
|
|
1830
1810
|
reject(@"GIF_ERROR", @"Failed to create GIF image destination", nil);
|
|
1831
1811
|
return;
|
|
@@ -2753,74 +2733,31 @@ RCT_EXPORT_METHOD(pickMedia:(NSDictionary *)options
|
|
|
2753
2733
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
2754
2734
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
2755
2735
|
NSString *mediaType = options[@"mediaType"] ?: @"any";
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
if (scene.activationState == UISceneActivationStateForegroundActive && [scene isKindOfClass:[UIWindowScene class]]) {
|
|
2761
|
-
for (UIWindow *w in ((UIWindowScene *)scene).windows) {
|
|
2762
|
-
if (w.isKeyWindow) {
|
|
2763
|
-
keyWin = w;
|
|
2764
|
-
break;
|
|
2765
|
-
}
|
|
2766
|
-
}
|
|
2767
|
-
}
|
|
2768
|
-
if (keyWin) break;
|
|
2769
|
-
}
|
|
2770
|
-
}
|
|
2771
|
-
if (!keyWin) {
|
|
2772
|
-
#pragma clang diagnostic push
|
|
2773
|
-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
2774
|
-
keyWin = [UIApplication sharedApplication].keyWindow ?: [UIApplication sharedApplication].windows.firstObject;
|
|
2775
|
-
#pragma clang diagnostic pop
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
UIViewController *rootVC = keyWin.rootViewController;
|
|
2779
|
-
while (rootVC.presentedViewController) {
|
|
2780
|
-
rootVC = rootVC.presentedViewController;
|
|
2736
|
+
UIViewController *rootVC = GetTopViewController();
|
|
2737
|
+
if (!rootVC) {
|
|
2738
|
+
reject(@"PICK_ERROR", @"Unable to find active view controller for media picker", nil);
|
|
2739
|
+
return;
|
|
2781
2740
|
}
|
|
2782
|
-
|
|
2741
|
+
|
|
2783
2742
|
g_pickerDelegate = [[InAppInspectorPickerDelegate alloc] init];
|
|
2784
2743
|
g_pickerDelegate.resolve = resolve;
|
|
2785
2744
|
g_pickerDelegate.reject = reject;
|
|
2786
2745
|
g_pickerDelegate.capturesDirectory = [self getCapturesDirectory];
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
if (PHPickerVCClass && PHPickerConfigClass && PHPickerFilterClass) {
|
|
2793
|
-
id config = [[PHPickerConfigClass alloc] init];
|
|
2794
|
-
[config setValue:@1 forKey:@"selectionLimit"];
|
|
2795
|
-
|
|
2796
|
-
id filter = nil;
|
|
2797
|
-
SEL imgFilterSel = NSSelectorFromString(@"imagesFilter");
|
|
2798
|
-
SEL vidFilterSel = NSSelectorFromString(@"videosFilter");
|
|
2799
|
-
SEL anyFilterSel = NSSelectorFromString(@"anyFilterMatchingSubfilters:");
|
|
2800
|
-
|
|
2746
|
+
|
|
2747
|
+
if (@available(iOS 14.0, *)) {
|
|
2748
|
+
PHPickerConfiguration *config = [[PHPickerConfiguration alloc] init];
|
|
2749
|
+
config.selectionLimit = 1;
|
|
2750
|
+
|
|
2801
2751
|
if ([mediaType isEqualToString:@"image"]) {
|
|
2802
|
-
|
|
2803
|
-
filter = ((id (*)(id, SEL))objc_msgSend)(PHPickerFilterClass, imgFilterSel);
|
|
2804
|
-
}
|
|
2752
|
+
config.filter = [PHPickerFilter imagesFilter];
|
|
2805
2753
|
} else if ([mediaType isEqualToString:@"video"]) {
|
|
2806
|
-
|
|
2807
|
-
filter = ((id (*)(id, SEL))objc_msgSend)(PHPickerFilterClass, vidFilterSel);
|
|
2808
|
-
}
|
|
2754
|
+
config.filter = [PHPickerFilter videosFilter];
|
|
2809
2755
|
} else {
|
|
2810
|
-
|
|
2811
|
-
id vidFilter = [PHPickerFilterClass respondsToSelector:vidFilterSel] ? ((id (*)(id, SEL))objc_msgSend)(PHPickerFilterClass, vidFilterSel) : nil;
|
|
2812
|
-
if (imgFilter && vidFilter && [PHPickerFilterClass respondsToSelector:anyFilterSel]) {
|
|
2813
|
-
filter = ((id (*)(id, SEL, id))objc_msgSend)(PHPickerFilterClass, anyFilterSel, @[imgFilter, vidFilter]);
|
|
2814
|
-
}
|
|
2756
|
+
config.filter = [PHPickerFilter anyFilterMatchingSubfilters:@[[PHPickerFilter imagesFilter], [PHPickerFilter videosFilter]]];
|
|
2815
2757
|
}
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
SEL initConfigSel = NSSelectorFromString(@"initWithConfiguration:");
|
|
2821
|
-
id rawPicker = [PHPickerVCClass alloc];
|
|
2822
|
-
UIViewController *picker = ((UIViewController * (*)(id, SEL, id))objc_msgSend)(rawPicker, initConfigSel, config);
|
|
2823
|
-
[picker setValue:g_pickerDelegate forKey:@"delegate"];
|
|
2758
|
+
|
|
2759
|
+
PHPickerViewController *picker = [[PHPickerViewController alloc] initWithConfiguration:config];
|
|
2760
|
+
picker.delegate = g_pickerDelegate;
|
|
2824
2761
|
[rootVC presentViewController:picker animated:YES completion:nil];
|
|
2825
2762
|
} else {
|
|
2826
2763
|
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
|
|
@@ -2837,6 +2774,9 @@ RCT_EXPORT_METHOD(pickMedia:(NSDictionary *)options
|
|
|
2837
2774
|
#pragma clang diagnostic pop
|
|
2838
2775
|
[rootVC presentViewController:picker animated:YES completion:nil];
|
|
2839
2776
|
}
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2840
2780
|
RCT_EXPORT_METHOD(writeExportFile:(NSString *)filename
|
|
2841
2781
|
content:(NSString *)content
|
|
2842
2782
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
@@ -2884,13 +2824,15 @@ RCT_EXPORT_METHOD(shareFile:(NSString *)filePath
|
|
|
2884
2824
|
if (title && title.length > 0) {
|
|
2885
2825
|
[activityVC setValue:title forKey:@"subject"];
|
|
2886
2826
|
}
|
|
2887
|
-
UIViewController *rootVC =
|
|
2888
|
-
|
|
2889
|
-
|
|
2827
|
+
UIViewController *rootVC = GetTopViewController();
|
|
2828
|
+
if (!rootVC) {
|
|
2829
|
+
reject(@"SHARE_ERROR", @"Unable to find active view controller to share file", nil);
|
|
2830
|
+
return;
|
|
2890
2831
|
}
|
|
2891
|
-
if (
|
|
2832
|
+
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad && rootVC.view) {
|
|
2892
2833
|
activityVC.popoverPresentationController.sourceView = rootVC.view;
|
|
2893
|
-
activityVC.popoverPresentationController.sourceRect = CGRectMake(rootVC.view.bounds
|
|
2834
|
+
activityVC.popoverPresentationController.sourceRect = CGRectMake(CGRectGetMidX(rootVC.view.bounds), CGRectGetMidY(rootVC.view.bounds), 1, 1);
|
|
2835
|
+
activityVC.popoverPresentationController.permittedArrowDirections = 0;
|
|
2894
2836
|
}
|
|
2895
2837
|
activityVC.completionWithItemsHandler = ^(UIActivityType activityType, BOOL completed, NSArray *returnedItems, NSError *activityError) {
|
|
2896
2838
|
resolve(@(completed));
|
|
@@ -2902,6 +2844,27 @@ RCT_EXPORT_METHOD(shareFile:(NSString *)filePath
|
|
|
2902
2844
|
});
|
|
2903
2845
|
}
|
|
2904
2846
|
|
|
2847
|
+
- (void)invalidate {
|
|
2848
|
+
[super invalidate];
|
|
2849
|
+
hasListeners = NO;
|
|
2850
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
2851
|
+
|
|
2852
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
2853
|
+
if (self->displayLink != nil) {
|
|
2854
|
+
[self->displayLink invalidate];
|
|
2855
|
+
self->displayLink = nil;
|
|
2856
|
+
}
|
|
2857
|
+
if (self->_softwareRecordingTimerSource) {
|
|
2858
|
+
dispatch_source_cancel(self->_softwareRecordingTimerSource);
|
|
2859
|
+
self->_softwareRecordingTimerSource = nil;
|
|
2860
|
+
}
|
|
2861
|
+
if (floatingButtonView != nil) {
|
|
2862
|
+
[floatingButtonView removeFromSuperview];
|
|
2863
|
+
floatingButtonView = nil;
|
|
2864
|
+
}
|
|
2865
|
+
});
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2905
2868
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2906
2869
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
2907
2870
|
(const facebook::react::ObjCTurboModule::InitParams &)params
|