Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dmytro-relkin
Copy link

@dmytro-relkin dmytro-relkin commented Jul 11, 2025

Summary:
This PR resolves TurboModule compatibility issues with React Native 0.72+ by renaming all overloaded native methods to have unique names. This prevents runtime crashes caused by duplicate method names in the new architecture.

Details:
Renamed all overloaded native methods (e.g., logEvent(eventName, vars) → logEventWithVars(eventName, vars), setGeoIPTrackingEnabled(enabled, promise) → setGeoIPTrackingEnabledWithPromise(enabled, promise), etc.) on both Android and iOS.

Updated all JS usage and examples to use the new method names.

No functional changes: the renamed methods work exactly as before, just with unique names to satisfy TurboModule requirements.

This change is required for compatibility with React Native 0.72+ and Expo SDK 53+.

Why:
React Native’s new TurboModule system does not allow multiple native methods with the same name, even if their parameters differ. This PR ensures the SDK works with the latest React Native versions and avoids runtime crashes.

Impact:

  • No breaking changes for single-argument methods.
  • For methods that previously accepted multiple signatures (e.g., logEvent with and without parameters), JS code using the two-argument version must now use the new method name (e.g., logEventWithVars).

@kwadwo
Copy link

kwadwo commented Jul 16, 2025

@igstewart3 or @TNeftzger Do you have any thoughts on this? Any guidance or recommendations would be helpful. Thanks!

@TNeftzger
Copy link

Hey @kwadwo! Just getting back from holiday and taking a look!

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

Successfully merging this pull request may close these issues.

3 participants