evothings / phonegap-estimotebeacons

This repository is no longer maintained - new maintainer is welcome!
MIT License
338 stars 178 forks source link

startMonitoringForRegion sometimes hangs, sometimes returns unknown on iOS #71

Open verybigelephants opened 9 years ago

verybigelephants commented 9 years ago

hello,

i am sorry for such a poor bug report but i don't really know how to provide specific conditions for replicating.

i am developing an app with startMonitoringForRegion where i provide uuid and major values to start monitoring. the testing device is ipad (i think it's mini, dunno, borrowed it from work). it works for a while but then as i develop and re-save via evothings bench + client, it starts getting really sloppy.

at first it will start taking much longer time to fire onMonitor event. sometimes it fires right away, sometimes it takes a while (i have a beacon lying right next to it). then after a while it also starts constantly returning "unknown" event instead of "inside" or "outside" event. nothing seems to help, neither re-saving files, nor chopping code down to the bare-bones, nor turning the device off and on!

truly strange thing is that i can start "Ranging" just fine and it returns good values too. both with estimote beacons plugin and plain ibeacon plugin. it is just monitoring that starts getting bad. the battery life is not drained out neither (abuot 50% right now)

could you please help me releal what is going on? or do i miss something? does apple ban regions that get monitored too often? or should i not only "start" but also "stop" monitoring as well? i have read that apple allows monitoring of 20 regions only. i would love any help

ghost commented 9 years ago

Hi thanks for reporting. I have not tested monitoring extensively, adding that to my todo-list. It may very well be a bug in there somewhere. Cannot think of anything causing this at the moment, will look into it and do some testing.