Question: I have an array with various values in python. Those values belong to a column in an excel file. How can I delete all the rows from excel file containing those values? Can I delete those rows directly by using some function in excel?

Answer: 
```
if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { // iOS8+
    // Sending a message to avoid compile time error
    [[UIApplication sharedApplication] sendAction:@selector(requestWhenInUseAuthorization)
                                               to:self.locationManager
                                             from:self
                                         forEvent:nil];
} else {
    [self.locationManager startUpdatingLocation];
}

```

}

I think you may need to include something like this for the requestWhenInUseAuthorization
Assume that you are using CLLocationManager. So did you make a **strong** reference to your *locationManager* object?

It seems to be a case when you requested location in local scope (variable) inside a function. Then trying to use MapKit, but locationManager object is already deallocated.

To solve that case, you should declare...

```
var locationManager = CLLocationManager()

```

... as an instance variable, then request authorization, and then using location services.