title: Error when trying to get user location (swift)
body: <p>I am trying to get user's location on iOS.
  I use <code>CLLocationManagerDelegate</code> for it.</p>
  
  <pre><code>if CLLocationManager.locationServicesEnabled() {
      locationManager.delegate = self
      locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters
      locationManager.requestLocation()
  }
  
  func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
      let location = locations.first
      print("locations = \(location?.coordinate.latitude) \(location?.coordinate.longitude)")
  }
  </code></pre>
  
  <p>But I get this error</p>
  
  <blockquote>
    <p>2017-03-24 18:03:57.183 *** Assertion failure in -[CLLocationManager requestLocation],
         /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreLocationFramework_Sim/CoreLocation-2100.0.34/Framework/CoreLocation/CLLocationManager.m:867<br>
        2017-03-24 18:03:57.194 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
         reason: 'Delegate must respond to locationManager:didFailWithError:'</p>
  </blockquote>
  
  <p>After implementing <code>locationManager:didFailWithError:</code></p>
  
  <pre><code>func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
      print(error.description)
  }
  </code></pre>
  
  <p>I have this warning</p>
  
  <blockquote>
    <p>Instance method 'locationManager(<em>:didFailWithError:)' nearly matches optional requirement 'locationManager(</em>:didFailWithError:)' 
         of protocol 'CLLocationManagerDelegate'</p>
  </blockquote>
  
  <p>And again this error</p>
  
  <blockquote>
    <p>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
         reason: 'Delegate must respond to locationManager:didFailWithError:'</p>
  </blockquote>
  
  <p>I dont know what incorrect. <code>locationManager:didFailWithError:</code> implemented, but I have same error. </p>