react-native-beacons-manager icon indicating copy to clipboard operation
react-native-beacons-manager copied to clipboard

Showing warning - beaconsDidRange with no listeners registered.

Open sjaidka224 opened this issue 5 years ago • 4 comments

Version

1.1.0

Platform

iOS

OS version

iOS 12.2

Steps to reproduce

  1. 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 });

sjaidka224 avatar Apr 15 '19 01:04 sjaidka224

It is not showing this warning when I installed packaged version 1.0.7

sjaidka224 avatar Apr 15 '19 02:04 sjaidka224

But still not able to track beacons.

sjaidka224 avatar May 01 '19 09:05 sjaidka224

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.

TimFinucane avatar Jun 18 '19 06:06 TimFinucane

now I am also facing the same issue in IOS , any idea how it can be solve @organom @TimFinucane @sjaidka224

kirantripathi avatar Nov 05 '20 09:11 kirantripathi