I upgraded to react native 60 and with it came Pods. Its too late to revert now. I get the error
@react-native-community/geolocation NativeModule.RNCGeolocation is Null.
Ive linked the module, uninstall reinstall module, uninstall node modules and reinstall, pod install, created new projects etc etc
I had the same issue. I was actually using another library, which depended on @react-native-community/gelocation
, which was react-native-geolocation-service
. I didn't actually follow the installation steps for this. When I did, it worked. I guess since you're upgrading and have unlinked, you need to add this to the Podfile, as it might not support autolinking.
For RN version > 0.60, from geolocation service docs,
Update your 'Podfile' (Add the following to the Podfile)
`pod 'react-native-geolocation', path: '../node_modules/@react-native-community/geolocation'`
Then run
pod install
from ios directory
I'm building my app on an android device and I had the same issue!
This is what solved my issue:
1: npm i 'react-native-geolocation-service
2: Changing this in "app.js"
// import Geolocation from '@react-native-community/geolocation';
import Geolocation from 'react-native-geolocation-service';
Here's the link to the issue on github: native-geolocation/issues
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With