O'Reilly logo

Getting Started with Flurry Analytics by Bhanu Birani

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

Location tracking

You can fetch the user's location by using the CCLocationManager class. The following code will start to get the current location of the user. However, to track a user's location, you need to add CoreLocation.framework in your project to track the location of a user in Flurry as shown:

  CLLocationManager *locationManager = [[CLLocationManager alloc] init];
  [locationManager startUpdatingLocation];

After getting the location, you can set the location in Flurry. You can set CCLocationManagerDelegate to get the callback when the updated location is received. Once the updated location is received from the locationManager class, you can use the following method to set the same on Flurry:

 CLLocation *location = locationManager.location; ...

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