Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Build Issues in Bridgeless Mode #563

Open
connorpmullins opened this issue Jul 2, 2024 · 2 comments
Open

Android Build Issues in Bridgeless Mode #563

connorpmullins opened this issue Jul 2, 2024 · 2 comments

Comments

@connorpmullins
Copy link

Hey devs:

Looks like there's an issue in the react native bridge of the Iterable Android SDK where you annotate two methods with the same name.

I'm going to patch this because I need to upgrade to RN74 and bridgeless, so I'll post back here when I've made a fix. Here's the issue I filed with React Native and their response.

@connorpmullins
Copy link
Author

Here's my patch with yarn:

diff --git a/android/.gradle/8.1.1/checksums/checksums.lock b/android/.gradle/8.1.1/checksums/checksums.lock
new file mode 100644
index 0000000000000000000000000000000000000000..0e5d79c576417eebe7a8151ec877288e08ba2f8e
--- /dev/null
+++ b/android/.gradle/8.1.1/checksums/checksums.lock
@@ -0,0 +1 @@
+�Pw"@�=;���������
\ No newline at end of file
diff --git a/android/.gradle/8.1.1/dependencies-accessors/dependencies-accessors.lock b/android/.gradle/8.1.1/dependencies-accessors/dependencies-accessors.lock
new file mode 100644
index 0000000000000000000000000000000000000000..fec926b6d27b130ddafeb7ce7ba3b1537747acb4
--- /dev/null
+++ b/android/.gradle/8.1.1/dependencies-accessors/dependencies-accessors.lock
@@ -0,0 +1 @@
+�A\R8������������
\ No newline at end of file
diff --git a/android/.gradle/8.1.1/dependencies-accessors/gc.properties b/android/.gradle/8.1.1/dependencies-accessors/gc.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/android/.gradle/8.1.1/fileChanges/last-build.bin b/android/.gradle/8.1.1/fileChanges/last-build.bin
new file mode 100644
index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d
--- /dev/null
+++ b/android/.gradle/8.1.1/fileChanges/last-build.bin
@@ -0,0 +1 @@
+�
\ No newline at end of file
diff --git a/android/.gradle/8.1.1/fileHashes/fileHashes.lock b/android/.gradle/8.1.1/fileHashes/fileHashes.lock
new file mode 100644
index 0000000000000000000000000000000000000000..62b9955c93c772bfe7071448cf064ad10f0803a4
--- /dev/null
+++ b/android/.gradle/8.1.1/fileHashes/fileHashes.lock
@@ -0,0 +1 @@
+����z�����������
\ No newline at end of file
diff --git a/android/.gradle/8.1.1/gc.properties b/android/.gradle/8.1.1/gc.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000000000000000000000000000000000000..e7257b4aa8b8315f09f02c86c13b4a9a50b0dff7
--- /dev/null
+++ b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
@@ -0,0 +1 @@
+�r<_2(�����������
\ No newline at end of file
diff --git a/android/.gradle/buildOutputCleanup/cache.properties b/android/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000000000000000000000000000000000000..7b7d8757f9ccff6ffb1d58b5c054fc9991e9dc37
--- /dev/null
+++ b/android/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Tue Jul 02 14:05:23 PDT 2024
+gradle.version=8.1.1
diff --git a/android/.gradle/vcs-1/gc.properties b/android/.gradle/vcs-1/gc.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java b/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java
index 0f55031aac67cdabbef42a496981d87ee4c7dbf9..4850623d291035fa4500c44f0590d3cda112e7de 100644
--- a/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java
+++ b/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java
@@ -109,16 +109,16 @@ public class RNIterableAPIModule extends ReactContextBaseJavaModule implements I
     @ReactMethod
     public void setEmail(@Nullable String email) {
         IterableLogger.d(TAG, "setEmail: " + email);
-        
+
         IterableApi.getInstance().setEmail(email);
     }
 
-    @ReactMethod
-    public void setEmail(@Nullable String email, @Nullable String authToken) {
-        IterableLogger.d(TAG, "setEmail: " + email + " authToken: " + authToken);
-
-        IterableApi.getInstance().setEmail(email, authToken);
-    }
+//    @ReactMethod
+//    public void setEmail(@Nullable String email, @Nullable String authToken) {
+//        IterableLogger.d(TAG, "setEmail: " + email + " authToken: " + authToken);
+//
+//        IterableApi.getInstance().setEmail(email, authToken);
+//    }
 
     @ReactMethod
     public void updateEmail(String email) {
@@ -127,12 +127,12 @@ public class RNIterableAPIModule extends ReactContextBaseJavaModule implements I
         IterableApi.getInstance().updateEmail(email);
     }
 
-    @ReactMethod
-    public void updateEmail(String email, @Nullable String authToken) {
-        IterableLogger.d(TAG, "updateEmail: " + email + " authToken: " + authToken);
-
-        IterableApi.getInstance().updateEmail(email, authToken);
-    }
+//    @ReactMethod
+//    public void updateEmail(String em ail, @Nullable String authToken) {
+//        IterableLogger.d(TAG, "updateEmail: " + email + " authToken: " + authToken);
+//
+//        IterableApi.getInstance().updateEmail(email, authToken);
+//    }
 
     @ReactMethod
     public void getEmail(Promise promise) {
@@ -151,12 +151,12 @@ public class RNIterableAPIModule extends ReactContextBaseJavaModule implements I
         IterableApi.getInstance().setUserId(userId);
     }
 
-    @ReactMethod
-    public void setUserId(@Nullable String userId, @Nullable String authToken) {
-        IterableLogger.d(TAG, "setUserId: " + userId + " authToken: " + authToken);
-        
-        IterableApi.getInstance().setUserId(userId, authToken);
-    }
+//    @ReactMethod
+//    public void setUserId(@Nullable String userId, @Nullable String authToken) {
+//        IterableLogger.d(TAG, "setUserId: " + userId + " authToken: " + authToken);
+//
+//        IterableApi.getInstance().setUserId(userId, authToken);
+//    }
 
     @ReactMethod
     public void updateUser(ReadableMap dataFields, Boolean mergeNestedObjects) {

@connorpmullins
Copy link
Author

Update - looks like the correct fix is to remove the version of the methods that only accepts 1 argument, not the one that accepts 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant