Sending a location object

To send a location object, call:

let clLocation = CLLocation(latitude: 50.822530000000015, longitude: 0.13716299999998682) do { try MedalliaMXO.process(location: clLocation) } catch { print("Error processing location: \(error.localizedDescription)") }
NSError *error;
CLLocation *location = [[CLLocation alloc] initWithLatitude:50.822530000000015 longitude:0.13716299999998682];
[MedalliaMXO processLocation:location error:&error];

Pass the location object as a parameter to the processLocation method. Use CLLocationManager delegate methods to call processLocation, as shown below:

func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { MedalliaMXO.process(locations.first) }
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations {
    [MedalliaMXO processLocation:[locations firstObject]];
}