Save an image with EXIF metadata to Photo Library

There does not seem to be much authoritative material about how to handle this.


I have an image (actually a photo sent from another device). I would like to save this to the local device's Photo Library, which I am told to use the PhotoKit via PHAssetCreationRequest.forAsset() method.


When I do this, and open the newly added photo with an EXIF data viewer app, it does not contain the associated metadata.


However, the Photo Library suggests it has some metadata. Specifically, if I drill into the containing "Moment" the photos are within, my new photo drops a pin on a map in the same location. And it has the creationDate values as well.


This SO thread suggests Photo Library retains it's own separate database of this information. Is this populated by the call to the above method?

https://stackoverflow.com/questions/31664822/phasset-location-gps-metadata-whats-wrong/31665119#31665119


This thread suggests EXIF data is only embeddable in JPEG images, not PNG.

https://forum.xojo.com/54008-exif-location-data-with-camera-images/0


Other forums and support threads suggest using other frameworks, like Core Media, Core Graphics, ALAssetsLibrary and Core Image methods to achieve this.

https://stackoverflow.com/questions/7965299/write-uiimage-along-with-metadata-exif-gps-tiff-in-iphones-photo-library


How should I know about all these various methods that seem to do the same thing?

Why and when should I use each?

Is there a preferred approach? Or a simpler approach?

If I import a JPEG image with embedded EXIF data (i.e. manually add these via the Core Media, or other, frameworks first) to the Photo Library, does it read in the avialable EXIF data and makes use of it within it's own database?


Thanks