One important thing to keep in mind, I’m not sure if you guys are aware of this behavior—if you do, then sorry for over-explaining (:
Enter and exit events are only triggered when the state changes, i.e., goes from inside to outside and vice versa. If you start monitoring with the beacon already in range, it won’t trigger an immediate enter. Same for exit—if you start monitoring and the beacon is out of range, there won’t be an immediate exit.
Furthermore, exit event has an internal delay of 30 seconds—so you need to leave the range of the beacon for at least 30 seconds in order for it to trigger.
I’ll try to illustrate this with an example:
- Let’s assume we’re starting with the beacon in range of the device.
- You call startMonitoring.
- Monitoring starts, and the state of the beacon region is determined to be “inside.” There should be a call to
didDetermineState with this initial state, but there won’t be a call to
- You move out of range of the beacon. As soon as you’re out, the clock starts ticking.
- When the clocks reaches 30 seconds, the state of the beacon region will change to “outside.” There will be a call to
didDetermineState. Also, since the state changed from “inside” to “outside,” there will be a call to
- Now you move back in range. The state changes to “inside” again. There will be a call to
didDetermineState. And again, since the state changed from “outside” to “inside,” there now will be a call to
Last but not least, for some devices, and in some special cases, it may actually take up to 15 minutes for iOS to acknowledge the state change. We know this to be the case for iPhone 4S, and I’m not sure about iPads. Newer iPhones (5, 5S, 6, etc.) usually respond immediately. Any chance you have some alternative iOS device at hand to test?