O'Reilly logo

Learning iBeacon by Craig Gilchrist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hello world

In time-honored tradition, we can't conclude the first chapter without the traditional "Hello World" tutorial. We'll be using your Mac as an iBeacon broadcaster using the companion app, and the app will simply show an alert every time it enters or exits the region.

We will cover all of these concepts in more detail in later chapters, but for reference, here are the classes we'll be using:

  • CLLocationManager: The CLLocationManager class delivers location-related events to your app and tells you when you enter or exit a region
  • CLLocationManagerDelegate: The CLLocationManagerDelegate protocol defines the delegate methods used to receive location and heading updates from CLLocationManager
  • CLBeaconRegion: A CLBeaconRegion object defines a type ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required