I managed to get local notification when iBeacon (using Kontakt Beacon) enter a region in Background mode . at the same time I monitor 3 beacon regions with specific & unique Identifier (each has same UUID but unique Major and Minor combination). In Lock Screen Mode, my app can notify when these beacons present, but I don't know why even the beacons and my app all stay still almost next to each other, the delegate DidExitRegion is still called, please look at my Log.
2014-01-18 11:56:49.828 sunlandbeacon[1385:60b] Enter Inactive mode
2014-01-18 11:56:49.848 sunlandbeacon[1385:60b] EnterBackgroundMode with Badge 0
2014-01-18 11:57:28.629 sunlandbeacon[1385:60b] Exit a beacon range
2014-01-18 11:57:29.305 sunlandbeacon[1385:60b] Local Notification Happens with Badge 1
2014-01-18 11:57:29.307 sunlandbeacon[1385:60b] Enter Region 1 with flagvalue 1
2014-01-18 11:58:15.173 sunlandbeacon[1385:60b] Exit a beacon range
2014-01-18 11:58:15.176 sunlandbeacon[1385:60b] Exit a beacon range
2014-01-18 11:58:15.178 sunlandbeacon[1385:60b] Exit a beacon range
2014-01-18 11:58:15.880 sunlandbeacon[1385:60b] Local Notification Happens with Badge 2
2014-01-18 11:58:15.886 sunlandbeacon[1385:60b] Enter Region 1 with flagvalue 1
2014-01-18 11:58:16.175 sunlandbeacon[1385:60b] Local Notification Happens with Badge 3
2014-01-18 11:58:16.184 sunlandbeacon[1385:60b] Enter Region 2 with flagvalue 2
2014-01-18 11:59:02.784 sunlandbeacon[1385:60b] Exit a beacon range
2014-01-18 11:59:02.787 sunlandbeacon[1385:60b] Exit a beacon range
2014-01-18 11:59:02.790 sunlandbeacon[1385:60b] Exit a beacon range
2014-01-18 11:59:03.491 sunlandbeacon[1385:60b] Local Notification Happens with Badge 4
2014-01-18 11:59:03.493 sunlandbeacon[1385:60b] Enter Region 1 with flagvalue 1
2014-01-18 11:59:03.792 sunlandbeacon[1385:60b] Local Notification Happens with Badge 5
2014-01-18 11:59:03.796 sunlandbeacon[1385:60b] Enter Region 2 with flagvalue 2
It is not uncommon for CoreLocation to periodically have a "glitch" and send you a notification saying you exited the region and then a second later say you entered that same region.
Without seeing your code, it's hard to say for certain that this is what happening, but if it is, you can fix this easily enough by adding a software filter on your exit and enter events. You basically ignore an exit event if an entry event happened for the same region within the previous few seconds. Likewise, you ignore an entry event if an exit event for the same region happened within the previous few seconds.
In order to do this you need to keep two tables, one that contains the most recent entry events keyed by region, and on that contains the most recent exit events keyed by region.
Here's an example of code to put at the top of a didEnterRegion callback method that uses a class-level NSMutableDictionary called _enteredTimes as a lookup table to accomplish this:
You have to put equivalent code in your didExitRegion callback.
CoreLocation is known to be fairly unstable with notifications both when monitoring regions and ranging beacons. We had to implement a similar filter to ranging notifications in our sample app, the source code is at https://github.com/BlueSenseNetworks/iOS
Basically the app keeps a circular buffer with the latest 10 sightings and makes a decision on what to display based on the type of the majority of sightings.