By Michael Harper

One of the most fundamental uses of beacons is their ability to wake up a sleeping mobile device. This post is an update of our 2015 post on Update On iOS Beacon Monitoring in the Background. For this update, we tested the time delay between when a beacon was turned on or off and when an associated beacon region entry or exit local notification was displayed on the lock screen of various Apple iOS mobile devices.

We tested an iPhone 6, iPhone 6S plus, and iPhone 7 all running iOS 10.3.1. In order to represent real-world settings, Bluetooth, wifi, and cellular data were all enabled. Testing was conducted in a typical office space with several other beacons and Bluetooth devices nearby. All devices were tested in the locked state with the screen off so that any notifications would appear on the lock screen. None of the devices were plugged in.

We used the “Local Notifications” option in our Beacon Thing for iOS app to display a local notification upon a region entry or exit event. This option creates two CLBeaconRegion objects (one that notifies only upon entry, one only upon exit), creates a UNNotificationRequest for each region, and adds them via UNUserNotificationCenter. In this way, iOS displays a local notification with the appropriate message upon region entry or exit without any additional action from the app.

To generate beacon region entry and exit events we used a RadBeacon Dot with the default advertising rate of 5Hz and default transmit power of -3dB. The beacon’s on/off switch was used to precipitate the region entry/exit events.

All mobile devices tested generated local notifications in response to a beacon region entry event similarly within a range of 2 to 15 seconds. Notifications in response to a beacon region exit event were significantly slower, in the 20 to 30 second range with some exceeding 2 minutes. In some instances no exit notification was ever received.

Device Median Entry Time Mean Entry Time Median Exit Time Mean Exit Time Max Exit Time

iPhone 6 9.5 s 8.8 s 31.5 s 31.5 s 34 s

iPhone 6S+ 5.5 s 6.7 s 60.5 s 47.5 s . 252 s

iPhone 7 5 s 6.5 s 31.5 s 57.8 s 138 s

Note that we observed a non-trivial number of times on all three devices where entry and exit events stopped being triggered within a reasonable amount of time when the device was locked. Sometimes, lifting the device or pressing the Home button caused the notification to appear immediately. Other times, a system restart was required to restore sanity to receiving notifications in a timely manner. We believe these problems were introduced with iOS 10 as discussed here.