This is an automated email from the ASF dual-hosted git repository.
manuelbeck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-camera.git
The following commit(s) were added to refs/heads/master by this push:
new fe1896c doc(ios): Document
`PHPickerConfigurationAssetRepresentationModeCurrent` (#945)
fe1896c is described below
commit fe1896cf1e9d56345c918041e9a43031e74145b0
Author: Manuel Beck <[email protected]>
AuthorDate: Thu Jan 29 19:31:30 2026 +0100
doc(ios): Document `PHPickerConfigurationAssetRepresentationModeCurrent`
(#945)
---
src/ios/CDVCamera.m | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index c8a893f..0ffadcd 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -318,6 +318,15 @@ static NSString* MIME_JPEG = @"image/jpeg";
}
config.selectionLimit = 1;
+
+ // PHPickerConfigurationAssetRepresentationModeCurrent:
+ // A mode that uses the current representation to avoid transcoding,
if possible.
+ // This means PHPicker tries to give you a representation already
available without
+ // re‑encoding. That usually is the stored file on device (e.g.,
HEIC/JPEG),
+ // but if the asset is only in iCloud or already has a cached
“current” rendition,
+ // you might get that cached representation instead of downloading the
original.
+ // This plugin supports only JPEG and PNG currently and will convert
the
+ // image later in processImage: to the requested format.
config.preferredAssetRepresentationMode =
PHPickerConfigurationAssetRepresentationModeCurrent;
PHPickerViewController *picker = [[PHPickerViewController alloc]
initWithConfiguration:config];
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]