14 Commits

Author SHA1 Message Date
エリス
571f1169fd chore(license): update header formatting (#958) 2026-03-24 13:52:15 +09:00
Manuel Beck
77e85f2f08 ios! rename CDVCameraPicker to CDVUIImagePickerController (#948)
- Rename to `CDVUIImagePickerController ` since it inherits from `UIImagePickerController` and is not only for taking pictures
- This is a breaking change because it renames an externally visible interface.
2026-01-30 18:41:01 +01:00
Manuel Beck
b75cff893e ios: rename method finalizePHPickerImage: and document it (#947)
- Rename to `processPHPickerImage:` since it does rotating, scaling and cropping and prepare the metadata
- Document the method and code
2026-01-30 17:49:52 +01:00
Manuel Beck
90ad137398 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`
2026-01-15 17:26:37 +01:00
Manuel Beck
dc682b2532 feat(ios): use PHPickerViewController for iOS 14+ (#937)
- Does not need any permissions for reading images
- The PHPickerViewController class is an alternative to UIImagePickerController. PHPickerViewController improves stability and reliability, and includes several benefits to developers and users, such as the following:
- Deferred image loading and recovery UI
- Reliable handling of large and complex assets, like RAW and panoramic images
- User-selectable assets that aren’t available for UIImagePickerController
- Configuration of the picker to display only Live Photos
- Availability of PHLivePhoto objects without library access
- Stricter validations against invalid inputs
- See documentation of PHPickerViewController: https://developer.apple.com/documentation/photosui/phpickerviewcontroller?language=objc
- Added tests for PHPickerViewController in `CameraTest.m`

* Documentation and formatting

- Document `takePicture` and `showCameraPicker` in `CDVCamera.m`
- A pragmas for UIImagePickerControllerDelegate methods and CLLocationManager methods
- Format some long methods declarations to multi-line instead single-line for better readability
- Remove unnecessry `dispatch_async(dispatch_get_main_queue() ...` in `takePicture` before calling `showCameraPicker`. This is already done in `showCameraPicker`.
- Source out code for permission denied alert dialog when accessing the camera or UIImagePickerController on iOS < 14 for picking images

* feat(ios): proper formatting of methods

- Use linux brace style: A brace have to be on a new line for method declarations
- Remove unnecessary whitespaces in method declrations

* doc: readme update

- Better document usage descriptions
- `NSPhotoLibraryUsageDescription` not needed for iOS 14+ when only picking images
- Improve formatting for xml, js
- sourceType `SAVEDPHOTOALBUM` is the same as `PHOTOLIBRARY` on Android and iOS 14+
- Use `PHOTOLIBRARY` as sourceType instead of `SAVEDPHOTOALBUM` in  photo picker example

* Android: Document `SAVEDPHOTOALBUM``

- Make clear that `SAVEDPHOTOALBUM` is the same like `PHOTOLIBRARY` and has only an effect on iOS < 14
- Format code when creating image chooser and document the request code parameter
2026-01-13 08:33:59 +01:00
Jan Piotrowski
06dc38f9ab docs: remove outdated test docs translations 2019-06-27 18:46:33 +02:00
Ams
cd72047dfc CB-13865: (IOS-Ipad) Making popover Window Size configurable using popoverOptions - imagePicker (#314) 2018-11-25 13:59:51 +01:00
daserge
fb871d40e2 CB-10865 Run ios native tests on Travis
Updated cordova-ios tests dependency version to latest published
Changed the tests to reflect the current scaling behavior
Fixed a typo in manual test img.onloadend -> img.onload
2016-03-21 12:54:07 +03:00
Shazron Abdullah
b683315be6 CB-9247 - Fixes compilation errors with cordova-ios 4.x 2015-06-25 06:09:59 -07:00
Victor Sosa
b6a8a24b88 CB-9128 cordova-plugin-camera documentation translation: cordova-plugin-camera 2015-06-12 09:38:52 -05:00
Shazron Abdullah
706a3aa73e CB-8601 - iOS camera unit tests broken 2015-05-11 17:39:40 -07:00
Jesse MacFadyen
b8b53c6254 add missing license header 2015-05-07 16:04:19 -07:00
Steve Gill
b698e10386 added missing apache header 2015-03-10 17:01:00 -07:00
Shazron Abdullah
482f2ac2cc CB-7938 - Added XCTest unit tests project, with stubs (adapted from SplashScreen unit test setup) (closes #60) 2015-01-09 16:04:28 -08:00