Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Receiving DidEnter and DidExit #19

Open
ghost opened this issue Oct 26, 2015 · 8 comments
Open

Not Receiving DidEnter and DidExit #19

ghost opened this issue Oct 26, 2015 · 8 comments

Comments

@ghost
Copy link

ghost commented Oct 26, 2015

I am not currently receiving these events - am I doing something wrong? Works just fine when I use ranging.

 var region = {
     identifier: 'myid.beacon.transmitter',
     uuid: 'f7826da6-4fa2-4e98-8024-bc5b71e0893e'    
 };

 Beacons.requestWhenInUseAuthorization();
 Beacons.startMonitoringForRegion(region);

 var subRegion = DeviceEventEmitter.addListener(
   'regionDidEnter',
   (data) => {
     console.log('!!!!! ---- |||| ==== !!!! ---- !!!=== !!!---');
     console.log('!!!!! ---- |||| ==== !!!! ---- !!!=== !!!---');
     console.log('!!!!! ---- |||| ==== !!!! ---- !!!=== !!!---');

     console.log('Region Did Enter!');
     console.log(data);

     console.log('!!!!! ---- |||| ==== !!!! ---- !!!=== !!!---');
     console.log('!!!!! ---- |||| ==== !!!! ---- !!!=== !!!---');
     console.log('!!!!! ---- |||| ==== !!!! ---- !!!=== !!!---');

   }
  );
@tioback
Copy link

tioback commented Jun 25, 2016

@bradynapier did you manage to solve this? I'm also stuck with monitoring events not being called.

@leomar-developer
Copy link

Does anyone knows if this is still a bug or something else needs to be done in order for these callbacks to work? I'm having the exact same issue.

@tioback
Copy link

tioback commented Nov 3, 2016

It worked once, but I cannot reproduce it.

@leomar-developer
Copy link

I can confirm it is NOT working in latest version (0.6.0), ranging beacons works fine though

@leomar-developer
Copy link

Can someone please shed some light on this one? I would really appreciate if someone can help out, we are using react 0.35.0 and a device with iOS 9. Ranging works fine but region monitoring seems to not be working we have tried a lot of variations on the code and "regionDidEnter" never gets called

@leomar-developer
Copy link

Just solved this one, I will describe what I did just in case it happens to be the same issue for the folks that also reported this above. The issue was that (for some strange reason) the popup dialog that asks the user to accept the usage of the background location was not coming up (even after properly adding the NSLocationAlwaysUsageDescription value on Info.plist), so I had to manually go to the app settings and tell it that the Location was needed "Always", after doing that and relaunching the app the events started to fire as expected.

@tioback
Copy link

tioback commented Nov 11, 2016

@leomar-developer, thanks! Did you try forcing the permissions popup to show?

@montehansen
Copy link

I have the same problem in that regionDidEnter and regionDidExit do not fire, actually, it's kind of flaky; sometimes the enter will fire sometimes not (mostly not). In my case, I verified that Location was set to Always and have also tried WhenInUse without changed. It seems that ranging works, and monitoring doesn't. I am using Estimote iBeacons.

react-native-cli: 1.2.0
react-native: 0.38.0
react-native-ibeacon: ^0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants