Closed aljary12 closed 1 year ago
Hi @aljary12,
We are aware of this issue and planning to solve it in our new releases, but there are different development processes in our team so at this time we can't merge your PR directly, thank you for your contribution.
In addition to your solution, you can try to create a new component with Availability plugin, then you will be able to import the new component dynamically in your App.js file with Platform checking feature of React Native.
const App = () => {
return (
<SafeAreaView >
{Platform.OS === 'ios' ? null : <TestAvailability />}
</SafeAreaView>
);
};
Hi! When we import react-native-hms-availability, there is no issue in android or Huawei phones, but the app crashes if we run it on ios device. The error is
Invariant Violation: new NativeEventEmitter() requires a non-null argument.
The fix is to movenew NativeEventEmitter(HMSAvailabilityModule)
intoOnErrorDialogFragmentCancelledListenerAdd
function.