fix(ios)! remove iPadOS popover code (#941)

- On iPadOS it was possible to configure a popover for setting the position, width and arrow position of the popover.  The code used the deprecated `UIPopoverController`, which would have to be fixed. To keep the plugin also maintainable, this was removed.
- The popover could repositioned with a `CameraPopoverHandle` on a `window.onorientationchange`. This was removed also.
- Removed documentation for popover from `README.md`
This commit is contained in:
Manuel Beck
2026-01-15 17:26:37 +01:00
committed by GitHub
parent dc682b2532
commit 90ad137398
12 changed files with 20 additions and 461 deletions
+1 -7
View File
@@ -22,8 +22,6 @@
const argscheck = require('cordova/argscheck');
const exec = require('cordova/exec');
const Camera = require('./Camera');
// XXX: commented out
// CameraPopoverHandle = require('./CameraPopoverHandle');
/**
* @namespace navigator
@@ -73,7 +71,6 @@ for (const key in Camera) {
* @property {module:Camera.MediaType} [mediaType=PICTURE] - Set the type of media to select from. Only works when `PictureSourceType` is `PHOTOLIBRARY` or `SAVEDPHOTOALBUM`.
* @property {Boolean} [correctOrientation] - Rotate the image to correct for the orientation of the device during capture.
* @property {Boolean} [saveToPhotoAlbum] - Save the image to the photo album on the device after capture.
* @property {module:CameraPopoverOptions} [popoverOptions] - iOS-only options that specify popover location in iPad.
* @property {module:Camera.Direction} [cameraDirection=BACK] - Choose the camera to use (front- or back-facing).
*/
@@ -140,7 +137,6 @@ cameraExport.getPicture = function (successCallback, errorCallback, options) {
const allowEdit = !!options.allowEdit;
const correctOrientation = !!options.correctOrientation;
const saveToPhotoAlbum = !!options.saveToPhotoAlbum;
const popoverOptions = getValue(options.popoverOptions, null);
const cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
if (allowEdit) {
@@ -148,11 +144,9 @@ cameraExport.getPicture = function (successCallback, errorCallback, options) {
}
const args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, cameraDirection];
exec(successCallback, errorCallback, 'Camera', 'takePicture', args);
// XXX: commented out
// return new CameraPopoverHandle();
};
/**