The CLBeaconRegion options
The properties of the CLBeaconRegion
instance have a huge impact on how your app behaves when running in the background. Let's explore a few of these options now:
CLBeaconRegion.notifyOnEntry
: When this property isYES
, a device crossing from the outside to the inside of the region triggers the delivery of a notification. If the property isNO
, a notification is not generated. If the app is not running when a boundary crossing occurs, the system launches the app in the background to handle it.CLBeaconRegion.notifyOnExit
: This property works in a similar way as mentioned in the preceding point, except for the notification that occurs when the device crosses from the inside to the outside of the region. There is usually a delay of up to 10 seconds after the device has fallen out of range of the last beacon in the region, but this can also be up to 30 seconds. This cushion time is to ensure that numerous entered and exited events are not called in quick succession...