nstudio / nativescript-camera-plus

MIT License
79 stars 50 forks source link

Fix ios13 gallery picker #116

Closed Logikgate closed 4 years ago

Logikgate commented 4 years ago

In iOS13 PHImageManager.requestImageForAsset is unreliable for requesting the original image size. This is especially true when Optimize Storage is turned on with iCloud photo backup.

iOS13 added PHImageManger.requestImageDataAndOrientationForAsset and according to the docs this is the desired way to request the data of the original image.

This pull request detects if requestImageDataAndOrientationForAsset is available and uses it, otherwise it falls back to requestImageForAsset for older iOS versions.

Fixes #107