1

I have already tried setting default location in product -> schemes -> allow current location is set.

func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
    let location: CLLocation = locations.first!
    self.mapView.centerCoordinate = location.coordinate
    let reg = MKCoordinateRegionMakeWithDistance(location.coordinate, 1500, 1500)
    self.mapView.setRegion(reg, animated: true)
    geoCode(location)


}

func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {
    print(error)
}
nkz
  • 53
  • 1
  • 7
  • Did you set either of the Authorization request strings in your `info.plist` file? That's a common pitfall with CLLocation http://stackoverflow.com/questions/24669985/cllocationmanager-authorization-issue-ios-8 – markedwardmurray Jul 23 '16 at 17:55
  • yeah i fixed the issue it was the info.plist. problem – nkz Jul 24 '16 at 19:12

0 Answers0