cryptomator-ios
cryptomator-ios copied to clipboard
Use PHAssetResourceManager instead of PHImageManager
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 PHImageManager 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.