Search code examples
iosios8photokitphotosframework

In PhotoKit, modifying PHAsset leaves original around. How? Overridable?


It seems like modifications to a particular PHAsset photo keep a version of the original around somehow, in order to be able to do this:

revert to original

  1. Is this documented (from a programming standpoint) somewhere?
  2. Can the original asset ever be overwritten?

Solution

  • The PHImageManager: requestImageForAsset: reference documentation gives some detail of what's going on here.

    It seems like you can never overwrite the original image data (the asset is technically just metadata) as you can specify PHImageRequestOptions for an image request which include a version of PHImageRequestOptionsVersionOriginal. From the PHImageRequestOptions documentation:

    Request the original, highest-fidelity version of the image asset.

    The resulting image is originally captured or imported version of the asset, regardless of any edits made.