I have a React Native app that imports a component written in Swift. While the component displays fine, none of the touch events (that worked in the standalone iOS version) work. Currently, my code is organised as follows:
A ViewController that contains the view logic is exposed to React through a UIView class that is exported using RCT_EXTERN_MODULE
. The ViewController is where I have put the function to handle the tap gesture. On the React-Native side, I have a sub class of React.Component
that renders the view. The view is wrapped in a TouchableWithoutFeedback
tag but I assume that also requires a reference to a function that calls my native code, which I am not sure how to provide.