Chapter 5. iOS and iBeacons

This chapter describes how to make iOS devices work with iBeacons. In keeping with the simple protocol, the APIs that serve iBeacon applications are also quite simple, though deceptively so. APIs provide support for the major protocol operations described in the previous two chapters: understanding when a device is near iBeacons, determining the identity of those iBeacons, and recognizing when the number and identity of iBeacons changes. It is also possible to use built-in features of iOS to interact with iBeacons, most notably, Passbook passes.

iBeacon Development on iOS with Core Location

Most of the iBeacon functions supported on iOS are provided through the iOS Core Location framework.20 Core Location has long enabled devices to use physical location attributes in an application, and iBeacon proximity functions were added in iOS 7.0.21

Users allow applications to make use of the Core Location framework. In the Privacy panel within iOS, shown in Figure 5-1, the device’s owner can block all applications from using Core Location functions, including iBeacon support, or selectively block applications from using Core Location. Naturally, devices must have hardware support for the underlying Bluetooth Low Energy functions, which in practice means an iPhone 4S or later iOS device. Macs sold since late 2011 also have the required Bluetooth hardware.

Location Services Control Panel
Figure ...

Get Building Applications with iBeacon now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.