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: 
The problem was I have asked for authorization to use location services if the app is in use and I have determined the authorization like this:

```
func locationManager(manager: CLLocationManager!,
        didChangeAuthorizationStatus status: CLAuthorizationStatus) {
            switch status {
            case CLAuthorizationStatus.Restricted:
                locationStatus = GpsStatus.restricted
                break
            case CLAuthorizationStatus.Denied:
                locationStatus = GpsStatus.denied
                break
            case CLAuthorizationStatus.NotDetermined:
                locationStatus = GpsStatus.notDeterminded
                break
            default:
                locationStatus = GpsStatus.allowed
                break
            }
    }

```

This seems to be wrong, the error is gone if I explicitly check for CLAuthorizationStatus.AuthorizedWhenInUse:

```
func locationManager(manager: CLLocationManager!,
        didChangeAuthorizationStatus status: CLAuthorizationStatus) {
            switch status {
            case CLAuthorizationStatus.Restricted:
                locationStatus = GpsStatus.restricted
                break
            case CLAuthorizationStatus.Denied:
                locationStatus = GpsStatus.denied
                break
            case CLAuthorizationStatus.NotDetermined:
                locationStatus = GpsStatus.notDeterminded
                break
            case CLAuthorizationStatus.AuthorizedWhenInUse:
                locationStatus = GpsStatus.allowed
            default:
                locationStatus = GpsStatus.notDeterminded
                break
            }
    }

```

EDIT:

Seems like it's also a problem to add a TrackingLocationButton before I have the permission to use location services.

So do this

```
     var userTrackingButton = MKUserTrackingBarButtonItem(mapView: self.mapView);
        self.toolBar.items?.insert(userTrackingButton, atIndex: 0)

```

only if you have the permission
For iOS 8 you need to define the "Privacy - Location Usage Description" in the Info.plist.

Eg. **NSLocationWhenInUseUsageDescription** = "Use your location to show near by stores".

or

**NSLocationAlwaysUsageDescription** = "Use your location to show near by stores".

This key specifies the reason for accessing the user’s location information.