react-native-location-enabler
react-native-location-enabler copied to clipboard
Issue on IOS
Hi, not able to run app in iOS after installing this library , issue is
Invariant Violation: new NativeEventEmitter() requires a non-null argument.
This issue is already reported and closed but its not fixed.
Hi did you fix it? I face with same problem
No, I ended up changing the library.
Can you give me advice for this future?
I used this one https://github.com/Richou/react-native-android-location-enabler#readme
You can use the platform-specific code of react-native. import the package when the phone is only android. first create two files by the name locationEnabler.android.js and locationEnabler.ios.js import the package in locationEnabler.android.js and use it as usual.
the link for platform-specific code of react-native https://reactnative.dev/docs/platform-specific-code.html#platform-specific-extensions
is there any way to edit the alert content?
is there any way to edit the alert content?
there is not any way to change the alert content, cause it comes from native android settings api
`import {Platform} from 'react-native';
import AddingDevicesScreenAndroid from './AddingDevicesScreen.android'; import AddingDevicesScreenIos from './AddingDevicesScreen.ios';
export default Platform.select({ ios: AddingDevicesScreenIos, android: AddingDevicesScreenAndroid, });`
You guys can try this. This work for me. I made 2 versions for each specific platform.
the best solution for me: https://reactnative.dev/docs/platform-specific-code#platform-specific-extensions