evothings / phonegap-estimotebeacons

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

kcl error domain error 5 on start monitoring Région on IOS 9 #94

Open TommyChausson opened 9 years ago

TommyChausson commented 9 years ago

Hello,

I tried to launch the exemple on an Iphone 6 Under IOS 9.0 . Each time I start monitoring a region i have got the "KCLErrorDomain Error 5", i tried a lot of thing like remove app as suggested on others posts. But nothing help me. The same code on an Iphone 4s under IOS 8 is working fine and do the job. Is there an issue with IOS9 ? Have you got any idea where this error come from ?

CookieCookson commented 9 years ago

+1 getting this issue too. Seems to be isolated to monitoring for regions on iOS 9.

255kb commented 9 years ago

Same error here on iOS 9.1, only for monitoring.

No idea where it comes from, but maybe this can help: I got the error when monitoring for this region object {uuid: '...'}, while using {uuid: '...', major: null, minor: null} does not throw the error (but it does not find any region when using null as major and/or minor).

CookieCookson commented 9 years ago

The issue above does not occur when doing startSecureMonitoringForRegion. This would be a short-term solution for anybody having the issue, however it would require that you have to use secure monitoring.

@255kb thats interesting, there might be a need to be more specific. If you provide the actual major and minor does it work?

CookieCookson commented 9 years ago

@256kb

when setting major/minor to null, it actually throws a different xCode error:

: -[NSNull integerValue]: unrecognized selector sent to instance 0x3a6c4588 No luck I'm afraid!
ttcremers commented 9 years ago

Running into this problem as well, upgrade to io9 and it breaks with ERROR|SystemFenceDao| Failed to monitor for region - Error Domain=kCLErrorDomain Code=5 "(null)"

I fiddled with the suggestions mentioned above but no luck. Sadly using secure beacons isn't option due to the sheer amount of beacons we use. I've seen that there haven't been any updates on the Estimote ios SDK for about 22 days. Anyone had any luck tracking down more details on this issue?

255kb commented 9 years ago

@CookieCookson sorry for the late reply, I still get the same error when providing the actual major/minor.

ttcremers commented 9 years ago

I've been experimenting further by using the xcode debugger, I can get the app to monitor by removing:

//[aManager requestStateForRegion:region];

in EstimoteBeacons.m on line 807

I believe this will cost you seconds on getting an initial good reading on you region though.

CookieCookson commented 9 years ago

Progress! That's good to hear. Have you noticed any side effects from commenting out this line?

ttcremers commented 9 years ago

Haven't noted any side effects yet (still testing though), if anything, it seems that without this line the initial detection of the region is actually faster then it was on iOS 8. Which is interesting as the line is there to trigger faster initial detection.

ttcremers commented 9 years ago

@CookieCookson @255kb It seems this reliably fixes the problem. We've done test on multiple devices (including iOS8) and all works as it should. I'll make a pull request

CookieCookson commented 9 years ago

@ttcremers Awesome! Thanks for your help on this.

ttcremers commented 9 years ago

Just for new visitors, or if you want to test the change/fix:

https://github.com/ttcremers/phonegap-estimotebeacons