Using Beacons with iOS 13

iOS 13 has introduced changes to Location and Bluetooth permissions. Estimote has an excellent new post summarising the changes and their affect on apps using beacons.

The article differentiates between Core Location and Core Bluetooth. Core Location implies using the iBeacon APIs while Core Bluetooth is lower level and allows scanning and connection to any Bluetooth LE devices, not just beacons (but perversely can’t scan the iBeacon UUD, major and minor). If, as we recommend, you use the Apple Core Location APIs directly, only the Core Location permission changes will affect you.

There was time, during the release of iOS 10 when Core Location beacon detection was faulty. At that time, Estimote decided to create an alternative beacon detection API based on Core Bluetooth to circumvent the problems. This means that if you use their SDK, users of your apps will get both Location and Bluetooth prompts and both permissions are required for the Proximity SDK to function. The iOS 10 triggering problems have since been fixed.

Kiosk Pro for iOS Uses iBeacons

Kiosk Pro is an app for iOS that turns an iPad into a public kiosk.

The technical documentation shows how you can trigger the showing of specific information when in the vicinity of a particular beacon. For example, if the kiosk is static, people with different beacons might trigger the showing of different information. If the kiosk is moving, for example a tablet being held, it might trigger the showing of different information based on the location of, for example, different exhibits. The kiosk can also be set to advertise iBeacon that can be picked up in iOS and Android apps.

View iBeacons

Bluetooth Low Energy now in Amazon FreeRTOS

Amazon has recently announced support for Bluetooth Low Energy in Amazon FreeRTOS. Amazon FreeRTOS is an IoT operating system for microcontrollers. Support for Bluetooth LE allows you to see Bluetooth devices and extract sensor data. Amazon’s implementation also allows you to subscribe to MQTT topics over Bluetooth Low Energy through an iOS or Android mobile device.

There’s an example how to Perform OTA Updates on Espressif ESP32 using Amazon FreeRTOS Bluetooth Low Energy. It shows how to connect Amazon FreeRTOS devices using Bluetooth Low Energy to AWS IoT Core via Android and iOS devices.

Apple Tag – a Tile-like Device

In our previous post on Apple WWDC on the ‘Find my’ feature we explained how the use of others’ phones for finding your devices is much like Tile (and other tracking beacons). However, there’s evidence that Apple might also be creating their own, separate, Tile-like device. 9to5Mac also have some further speculations.

It’s also interesting that Apple are changing the API for looking for beacons. CLBeaconRegion has become CLBeaconIdentityConstraint. The functionality currently remains the same in that you can filter by UUID/major/minor. However, the renaming of the API to make it more generic suggests it might eventually also be used for something else which might be the Apple tag.

While devices such as the Tile are great, when finding items remotely, they assume lots of people have them for someone else’s Tile app to see your tile. While the Tile network is large at 15 million trackers it will never be large enough to reliably find things. Apple has a much greater reach to make such a scheme more successful. Tracking things such as your lost car or dog become far more feasible.

An observation is that Google Android has a substantially greater reach offering Google the opportunity to offer something similar, more reliable (due to sheer number of devices) but more open as they did with Bluetooth Eddystone vs iBeacon. Taking this idea further, it’s a shame there isn’t an open Bluetooth tracking system or standard, for example, championed by the Bluetooth SIG.

September 2019 Update: It’s looks like Apple will be using UWB rather than Bluetooth making the solution more accurate and more proprietary. If true, it will eventually compete with Bluetooth Direction Finding.

May 2020 Update: The device will be called AirTag.

Apple, WWDC and Bluetooth

While some people were hoping for an ‘iBeacon version 2’ and there were rumours of a new Apple ultra wideband locating system, neither were announced at WWDC 2019. Instead, the Bluetooth news centred around the ability to use Bluetooth to find Apple devices, even when they aren’t online and even when they aren’t nearby.

Some news outlets have described this as a Bluetooth mesh network made up of all other iOS/Mac devices which is misleading and will lead to unfortunate confusion with the official Bluetooth SIG mesh. Instead, as Apple described, the system is much like the tracker ’tile’ type beacons that have apps that report in all seen beacons to a central server. If someone else’s device sees your device then you can find your device.

The difference to tile-like beacons is that the servers belong to Apple, the Bluetooth advertising is proprietary (and hence anonymous to eavesdroppers) and devices are acting as beacons. It’s interesting how, or if, Apple has done this without impacting both your iPhone battery life and the battery life of all iPhones scanning for beacons. The Bluetooth advertising must be very infrequent.

Privacy conscious people might also observe that this also gives a new way for Apple to know the location of Apple devices and proximity between devices. We wonder whether this will be ‘on’ by default for all users, opt in or opt out? Privacy matters aside, always knowing the proximity between Apple devices allows Apple to provide for some interesting possible future usecases.

UPDATE: There’s a new article in Wired explaining how the mechanism is end to end encrypted. This means Apple doesn’t know where your device is and, by implication, won’t be able to implement the possible ‘future usecases’ I alluded to.

Bluetooth LE Developer Questions

Here are the top questions we get asked as a Bluetooth LE developer:

  • For apps, can the app work without Bluetooth and location on?
    No. There’s no special OS mechanism on iOS nor Android that uses Bluetooth LE without the user having Bluetooth and location on. Many users leave Bluetooth and location on to allow ease of use with cars and audio headphones. Location is also usually one due to use with maps.
  • How does leaving Bluetooth on affect battery life?
    Bluetooth is no longer drains the battery as was the case in the early days of smartphones. It can be left on with negligible extra battery use.
  • What’s the maximum range?
    The range depends most on the Bluetooth device to are connecting to. Most devices, running on battery, work 50m to 100m. Devices with larger batteries, running from mains or USB can work up hundreds of metres. We have a device that works up to 4000m.
  • What SDK should be used?
    Most, but not all, SDKs and 3rd party libraries tend to be poorly implemented/documented, tie your code into using a particular beacon and rarely get updated to use newer mobile platform APIs. We recommend software use the iOS and Android Bluetooth APIs directly to make your code independent of the beacon type and readily able to be updated when the mobile platforms themselves are updated.

Read about our Bluetooth LE Software Development Services

SensingKit for iOS and Android

There’s a 3rd party SensingKit for iOS and Android that came out of the research, SensingKit: Evaluating the Sensor Power Consumption in iOS devices (pdf), by Kleomenis Katevas, Hamed Haddadi, Laurissa Tokarchuk of Queen Mary University of London.

While the SensingKit supports beacons, it only supports them for detecting proximity. The various sensor beacon variants are not supported. SensingKit is best used when you want the smartphone, not the beacon, to do the sensing. It’s useful when you want to mix smartphone sensing with beacon proximity sensing.

In most cases it’s best to use the native Android and iOS SDKs.

Read about our Bluetooth LE Development Services.