faizalshap / react-native-otp-verify

React native sms verification without additional permissions
MIT License
251 stars 95 forks source link

Update OtpVerify.h to prevent `new NativeEventEmitter()` warnings #121

Open adgang opened 2 months ago

adgang commented 2 months ago

This addresses #74 in ios.

Before: We see in logs(if LogBox warnings are disabled):

 WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
 WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.

After: logs are clean.

adgang commented 2 months ago

Based on: https://reactnative.dev/docs/native-modules-ios#sending-events-to-javascript

Potential fix for android as per: https://github.com/facebook/react-native/issues/32051

is(sample): https://github.com/invertase/react-native-firebase/pull/5616

johelder commented 3 weeks ago

any update?