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; ...