title: Save photo with geolocation data to photo library Swift 3
body: <p>How can I save a photo to photo library with geolocation metadata?</p>
  
  <p>I have requested (and allowed) the app to access user location:</p>
  
  <pre><code>private func allowAccessToUserLocation() {
  
          locationManager = CLLocationManager()
          locationManager.delegate = self
          locationManager.requestWhenInUseAuthorization()
      }
  </code></pre>
  
  <p>Do I need to ask for specific premissions for the camera app?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I use UIImagePickerController to take photos from within the app.
  All photos taken from within the app are stored in the photo library WITHOUT the geolocation.</p>
  
  <p>Does it have anything to do with the way I save the image to photo library? 
  Is my problem here rather than in the core location permissions??</p>
  
  <pre><code>func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
          if let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage{
              UIImageWriteToSavedPhotosAlbum(pickedImage, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil)
  
              dismiss(animated: true, completion: {
  
                  self.showPhoto()})
          }
      }
  </code></pre>