Replies: 1 comment
-
In case anybody checks this, the problem was that I had two instances due to my use of a singleton, the singleton pattern works for other kind of turbo modules but not this, if you want to access the shared instance what's the recommended way to do so? So far I use some of the internal methods to get it but not sure what the "correct" way would be. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a legacy application at my company that uses a custom method for loading React. We aim to follow the RCTAppDelegate closely but have made some adjustments to fit our needs, such as not directly inheriting from a custom AppDelegate. So far, the new architecture is working well. However, we encounter an issue when building a TurboModule using RCTEventEmitter on iOS. The module is intended to handle custom navigation, and while the
BackHandler.addEventListener
works fine on Android, it fails on iOS. All other TurboModules function correctly.The specific iOS error is:
Below is a simplified example of our code:
NavigationModule.h
NavigationModule.mm
The issue occurs when
sendBackEvent
is called on the native side. If you have any ideas on why this might be failing, I would greatly appreciate your input.Thank you for your help!
This version is more straightforward and breaks down the problem and code into easier-to-digest sections.
Beta Was this translation helpful? Give feedback.
All reactions