I'm currently writing my first app and deal with PHAssets
quite a bit. One attribute of PHAsset
that is particularly important for what I'm trying to achieve is creationDate
. This value is optional, so there are times when it can be nil
:
https://developer.apple.com/documentation/photos/phasset/1624776-creationdate
It's not at all clear to me why this value would ever be nil
, and I'm having difficultly reproducing this in iOS's Photos app to see how it deals with this case. I've tried clearing all metadata from some image files, and manually copying these into my Photos library, but creationDate
is still not nil
:/ Any ideas at all? I'd really like to see how the Photos app deals with such image files, as I'm trying to reproduce a similar user experience in my app.
For reference, I'm clearing the metadata using exiftool
:
exiftool -overwrite_original -all= /path/to/image.jpg