0

Is there an easy way to take a photo with exif informations like the standard iOS Camera App and save it to photo album?

     try? PHPhotoLibrary.shared().performChangesAndWait {

            let creationRequest = PHAssetChangeRequest.creationRequestForAsset(from: image)
            // Set metadata location
            if let location = self.locationManager?.latestLocation {
                creationRequest.location = location
            }

        }

is not saving location informations to exif.

I tried the following solution

add GPS metadata dictionary to image taken with AVFoundation in swift

I could save basic exif informations using AVCapture but inserting location informations did not work.

I can not believe that there is no easier way.

martomstom
  • 593
  • 7
  • 18
  • Why don't you add the exif info before creating your PHAsset? – Leo Dabus Oct 29 '17 at 16:37
  • Note that if you use image picker you wouldn't need to add the location to the PHAsset – Leo Dabus Oct 29 '17 at 16:38
  • If I use image picker to take photo I have to add location information using LocationManager. This is working but I don't know how to add location informations to EXIF. – martomstom Oct 29 '17 at 19:29

0 Answers0