Reader small image

You're reading from  Learning ibeacon

Product typeBook
Published inNov 2014
Publisher
ISBN-139781784397128
Edition1st Edition
Right arrow
Author (1)
Craig Gilchrist
Craig Gilchrist
author image
Craig Gilchrist

Craig Gilchrist is the Digital Director at Eden Agency (http://createdineden.com/), a small but mighty digital agency that is at the forefront of proximity marketing. His team is one of the first to release commercial iBeacon-powered apps in the world and currently boast over 1.5 million app downloads in multiple fields and have a perfectly balanced technical and creative team. Craig is based in North Yorkshire, England, and has been developing commercial software since graduating from the University of Teesside in 2004 with a BSc in Software Engineering and has been building apps for iOS since 2009. Craig is an avid reader and is always at the forefront of commercial technological developments. Other than mobile app development and digital marketing, Craig also has a keen interest in developing rich media, including gaming, children's interactive media, and a very keen interest in Unity and virtual reality with Oculus Rift.
Read more about Craig Gilchrist

Right arrow

Creating a CLLocationManager class


The CLLocationManager class is used to track both geolocation and proximity based on beacons. To start tracking beacon regions using the CLLocationManager class, we need to do the following:

  1. Create an instance of CLLocationManager.

  2. Assign an object conforming to the CLLocationManagerDelegate protocol to the delegate property.

  3. Call the appropriate start method to begin the delivery of events.

All location- and heading-related updates are delivered to the associated delegate object, which is a custom object that you provide.

Defining a CLLocationManager class line by line

Consider the following steps to define a CLLocationManager class line by line:

  1. Every class that needs to be notified about CLLocationManager events needs to first import the Core Location framework (usually in the header file) as shown:

    #import <CoreLocation/CoreLocation.h>
  2. Then, once the framework is imported, the class needs to declare itself as implementing the CLLocationManagerDelegate...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning ibeacon
Published in: Nov 2014Publisher: ISBN-13: 9781784397128

Author (1)

author image
Craig Gilchrist

Craig Gilchrist is the Digital Director at Eden Agency (http://createdineden.com/), a small but mighty digital agency that is at the forefront of proximity marketing. His team is one of the first to release commercial iBeacon-powered apps in the world and currently boast over 1.5 million app downloads in multiple fields and have a perfectly balanced technical and creative team. Craig is based in North Yorkshire, England, and has been developing commercial software since graduating from the University of Teesside in 2004 with a BSc in Software Engineering and has been building apps for iOS since 2009. Craig is an avid reader and is always at the forefront of commercial technological developments. Other than mobile app development and digital marketing, Craig also has a keen interest in developing rich media, including gaming, children's interactive media, and a very keen interest in Unity and virtual reality with Oculus Rift.
Read more about Craig Gilchrist