AzizAK / react-native-detector

a screenshot detector for react native
MIT License
210 stars 40 forks source link

Undefined symbols _RCTRegisterModule issue #64

Open steadev opened 1 year ago

steadev commented 1 year ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native-detector@0.2.3 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-detector/android/.project b/node_modules/react-native-detector/android/.project
index 0e0a1ba..042e8b5 100644
--- a/node_modules/react-native-detector/android/.project
+++ b/node_modules/react-native-detector/android/.project
@@ -5,6 +5,11 @@
    <projects>
    </projects>
    <buildSpec>
+       <buildCommand>
+           <name>org.eclipse.jdt.core.javabuilder</name>
+           <arguments>
+           </arguments>
+       </buildCommand>
        <buildCommand>
            <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
            <arguments>
@@ -12,6 +17,7 @@
        </buildCommand>
    </buildSpec>
    <natures>
+       <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
    </natures>
 </projectDescription>
diff --git a/node_modules/react-native-detector/android/.settings/org.eclipse.buildship.core.prefs b/node_modules/react-native-detector/android/.settings/org.eclipse.buildship.core.prefs
index 8c253d6..509edf4 100644
--- a/node_modules/react-native-detector/android/.settings/org.eclipse.buildship.core.prefs
+++ b/node_modules/react-native-detector/android/.settings/org.eclipse.buildship.core.prefs
@@ -2,7 +2,7 @@ arguments=
 auto.sync=false
 build.scans.enabled=false
 connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.0))
-connection.project.dir=
+connection.project.dir=../../../android
 eclipse.preferences.version=1
 gradle.user.home=
 java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
diff --git a/node_modules/react-native-detector/react-native-detector.podspec b/node_modules/react-native-detector/react-native-detector.podspec
index 0986fc8..460ab7d 100644
--- a/node_modules/react-native-detector/react-native-detector.podspec
+++ b/node_modules/react-native-detector/react-native-detector.podspec
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
   s.source_files = "ios/**/*.{h,m,mm}"

-  s.dependency "React"
+  s.dependency "React-Core"
 end

This issue body was partially generated by patch-package.