iOS monitoring example doesn't work ranging works fine
Version
1.0.7
RN version 49.3
Platform
iOS
OS version
iOS 11
Steps to reproduce
- Create default RN project
- Paste in monitoring.ios.js, fix up imports, add correct uuid and name, add plist entries
- run on ipad with some beacons laying around
Expected behavior
should see 'regionDidEnter' callback
Actual behavior
No beacons seen. The ranging example works fine. Beacons pop right up I see my exact issue was opened and closed 4 days ago #49 by @prem315, not sure what happened. Its really just a default app with the monitoring.ios.js example code with an updated plist which is here . I added the extra plist entry as xcode told me my app would not run without it.
<key>NSLocationWhenInUseUsageDescription</key>
<string>When in use description here</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Always and when in use Location description here</string>
I've also been experiencing issues. I found that when I quit the app and reloaded it, the beacons would not trigger an entry event, but would then trigger an exit event after which all ranging worked fine. Are you able to reproduce this?
Have the same issue. Not able to monitor beacons at all. Tried on Android and it works, but on iOS they just don't show up. Ranging works fine.
react-native-beacons-manager version: 1.0.7 react-native version: 0.52.0 iOS: 11.2.2
Run into the same issue. Work fine on Android but not on iOS. Please help.
Try to add all 3 keys in info.plist, Privacy - Location Always and When In Use Usage Description, Privacy - Location Always Usage Description and Privacy - Location When In Use Usage Description and also use Beacons.requestAlwaysAuthorization(). That's when the popup worked for me and the notifications have worked.
I have the same issue. I tried adding those three keys to .plist but still not getting any events triggering. I replaced Beacons.BeaconsEventEmitter.addListener by DeviceEventEmitter.addListener because of this error: TypeError: undefined is not an object (evaluating '_reactNativeBeaconsManager2.default.BeaconsEventEmitter.addListener
Then the app worked but it never triggers the regionDidEnter nor the regionDidExit
React-native: 0.53.3 React-native-beacons-manager version: 1.0.7 IOS: 11.2.5
Using this exact example https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/monitoring.ios.js
same problem here (only tested on iOS right now)
react-native-beacons-manager version: 1.0.7 react-native version: 0.50.4 iOS: 11.3
regionDidEnter and regionDidExit events are never fired. i have LOT of plist privacy authorizations :)
How can we help to fix the issue ?
Victor
Just tested with example and it still works fine.
So I guess it is time to update the example version so that I will be able to give you more feedback.
By the way: when monitoring, don't forget that if you are already in beacon region when starting monitoring it won't trigger enter event.
My way to test:
- I use a software beacon simulator
- beacon is off
- I start iOS Demo app
- I turn on beacon
- it works: enter event is thrown
This is a native limitation not specific to library.
hi @MacKentoch i'm doing the exact same thing (i'm usingmactsasbeacon -> https://github.com/timd/MactsAsBeacon here on gihtub )
- I turn mactsasbeacon off (UUID is the same as my code, triple checked ;) )
- i run my app on a real device via xcode app starts, beacon searching (monitorin) starts
- i turn on mactsasbeacon, nothing happens
Anyway, just to double check some facts :
- Version 1.10 is no more, there's only the 1.07 available , right ?
- The example code is not correct, we should subsitute Beacons.BeaconsEventEmitter with DeviceEventEmitter ? (importing DeviceEventEmitter from {react-native} ) or there's another way ?
Thanks.
Victor
The example code is correct for 1.1.0 which is ongoing now. Currently, the release version is 1.0.7 (via npm or yarn). According to this changelog : https://github.com/MacKentoch/react-native-beacons-manager/blob/master/CHANGELOG.md //before 1.0.8 (or until 1.0.7): DeviceEventEmitter.addListener() // simply becomes (for both iOS and Android) Beacons.BeaconsEventEmitter.addListener()
I got this issue and i think the problem was that i had first requested
requestWhenInUseAuthorization
in a earlier version of my app
then when i changed it to
requestAlwaysAuthorization
the old auth got stuck in the dev phone some how.
So try to delete the dev app and build it again. Go in to Settings > integrity > Location services. and make sure your app is listed as Allways
No progress on this one? I'm having the same issues on iOS. RangingBeacons works fine, Monitoring not working at all.