react-native-beacons-manager
react-native-beacons-manager copied to clipboard
Showing warning - beaconsDidRange with no listeners registered.
Version
1.1.0
Platform
iOS
OS version
iOS 12.2
Steps to reproduce
- Everything worked fine with beaconsDidRange but it is showing warning that Sending 'beaconsDidRange' with no listeners registered
Expected behavior
It should show nearby beacons
Actual behavior
It is not showing nearby beacons
My code in componentDidMount
DeviceEventEmitter.addListener("beaconsDidRange", data => { console.log("found beacons!", data.beacons); //API Calls here });
It is not showing this warning when I installed packaged version 1.0.7
But still not able to track beacons.
Try this fix: this library has a (untyped) export of BeaconsEventEmitter, which has to be used on iOS. To fix, replace the above line with:
Beacons.BeaconsEventEmitter.addListener("beaconsDidRange", data => { /* Code here */ });
This code is also compatible with android, although android will also work with the original code.
now I am also facing the same issue in IOS , any idea how it can be solve @organom @TimFinucane @sjaidka224