You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I receive the event in the JS side using
emitter.addListener('EXAMPLE_EVENT,({greeting}) =>{console.log(greeting)}').
It said "this._nativeModule.addListener is not a function"
Do you have any ideas on how that happens?
Thanks for any help
The text was updated successfully, but these errors were encountered:
Your generate generated a little bit different files that showed in this video.
Pay attention to a header file.
In video header file HelloWorld.h contains #import “RCTEventEmitter.h”, but your generated file doesn't.
As well definition of interface should be
@interface HelloWorldComponent : RCTEventEmitter <RCTBridgeModule>
// Define class properties here with @property
@end
instead of
@interface HelloWorldComponent : NSObject <RCTBridgeModule>
// Define class properties here with @property
@end
Dev setup:
react-native-create-bridge
version: 1.2.2react-native
version: 0.49.3I am using create-bridge in a:
What you did:
I followed this tutorial video : https://www.youtube.com/watch?v=OrIIPNEjQfs
to create a object-c Native Module. the constant and the general method works perfectly, but
What happened:
when I receive the event in the JS side using
emitter.addListener('EXAMPLE_EVENT,({greeting}) =>{console.log(greeting)}').
It said "this._nativeModule.addListener is not a function"
Do you have any ideas on how that happens?
Thanks for any help
The text was updated successfully, but these errors were encountered: