cryptomator-ios icon indicating copy to clipboard operation
cryptomator-ios copied to clipboard

Use PHAssetResourceManager instead of PHImageManager

Open tobihagemann opened this issue 7 years ago • 0 comments

Currently, Cryptomator is using PHImageManager to load assets from the Photos library.

In order to prevent photos from being modified/processed, we should load the underlying data via PHAssetResourceManager.

Unlike the PHImage​Manager class, which provides and caches the primary representations of assets as thumbnails, image objects, or video objects, the asset resource manager provides direct access to these underlying data resources.

We have to test carefully how PHAssetResourceManager behaves, when requesting the underlying data of Live Photos and RAW files.

PHAssetResourceManager is available since iOS 9.0. We're probably going to drop iOS 8.0 support with the next minor release, because it's not worth the effort to write legacy code.

It's also going to be very interesting, if we could finally obtain the original filename again instead of naming the files to this generic Photo dd-MM-yyyy HH mm ss.jpeg pattern: http://stackoverflow.com/a/32706194/1759462

Not sure if this is still up-to-date, because a lot has changed since iOS 10.0, but we're going to find out.

tobihagemann avatar Mar 29 '17 23:03 tobihagemann