kontaktio / kontakt-ios-sdk

This SDK makes it easy for you to configure, monitor, and securely update Kontakt.io Beacons through our Kontakt.io API.
http://developer.kontakt.io
Other
48 stars 9 forks source link

KTKBeaconRegion didExitRegion delegate doesn't get called #31

Closed patricks closed 7 years ago

patricks commented 7 years ago

I have build a small demo app to demonstrate, that the didExitRegion delegate method isn't called if I start another KTKBeaconRegion with the same UUID, but with a different major and minor ID.

Please try the demo app for more infos

https://github.com/patricks/kontakt_beacon_monitoring_problem

stoprocent commented 7 years ago

Hi @patricks

Thanks for sample code and issue report. I will update you as soon as I have any answers 👍

stoprocent commented 7 years ago

Hi @patricks I have tried your demo and when I was testing it i got this in logs:

Exit region KTKBeaconRegion (proximityUUID: 90DC5409-C9F4-4854-BC38-94367885850E, major: (null), minor: (null), identifier: MainRegion)
EXITING MAIN REGION
DidDetermineState state: Outside
Exit region KTKBeaconRegion (proximityUUID: 90DC5409-C9F4-4854-BC38-94367885850E, major: 666, minor: 777, identifier: SubRegion-666-777)
DidDetermineState state: Outside

... so from this I assume exit was called for both your regions Main and Sub. Only thing I can think of right now is that you have another beacon with same proximity UUID and exit is not called as 1+ beacons with same proximity are still nearby.

Maybe try generating new UUID with something like this: https://www.uuidgenerator.net/ Make sure you are changing proximity UUID on just one beacon and try your sample again. This is what I did. I've downloaded your code, updated 1 beacon and tried it and it worked. Same SDK version, iOS 10.1

adrianz commented 7 years ago

Hello @patricks

We've done more testing with @stoprocent and we came to conclusion this looks like a Core Location bug. Your sample in theory should work properly all the time, like @stoprocent said earlier, but it turns out it happens only in certain situations:

Additionally, we've rewritten your sample in plain Core Location and got exactly the same result. We'll do more tests, to be 100% sure, and then we'll report this bug to Apple.

stoprocent commented 7 years ago

Closing this issue as there is nothing we can do more at this moment.