Commit Graph

760 Commits

Author SHA1 Message Date
dependabot[bot] f97bedf229 chore(deps-dev): bump picomatch from 4.0.3 to 4.0.4 (#961)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/4.0.3...4.0.4)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 18:15:39 +02:00
エリス 90de0b0271 chore(lint): use correct browser config base (#962) 2026-03-27 22:02:29 +09:00
Manuel Beck 8b14f9f260 doc(readme): add note about using native browser features (#940)
- Make clear, that it is not necessary to use this plugin for selecting images or using the camera. Native browser features can be used, like `<input>`.
- Add links to MDN documentation for `<input type="file">`,  attribute `accept` and `capture`
- Suggested by @erisu
2026-03-26 10:29:09 +01:00
エリス c34106e16a chore(ci): update workflows (#960)
* chore(ci): sync workflows w/ paramedic
* chore(ci): add back iOS 15 & 16
* chore(ci): add release-audit workflow
* chore(ci): remove failing release-notify workflow
* chore(README): add release audit badge
2026-03-24 22:54:51 +09:00
エリス 571f1169fd chore(license): update header formatting (#958) 2026-03-24 13:52:15 +09:00
エリス de966b4533 doc: update & cleanup README, DEVELOPMENT & CONTRIBUTING (#955)
* doc(CONTRIBUTING): remove from README & update content
* doc(DEVELOPMENT): add & cleanup README
* doc(README): update badges
* doc(README): cleanup overview
* doc(README): add Supported Platforms section
* doc(README): cleanup Installation & merge Plugin Variables
* doc(README): create App Configuration section
* doc(README): added Android-Specific to App Configuration
* chore(README): fix list format
2026-03-24 13:38:07 +09:00
エリス 0d5a8e2b64 chore(ci): draft release (#959) 2026-03-24 13:00:28 +09:00
エリス 64f4022abd feat(android)!: bump ANDROIDX_CORE_VERSION default 1.18.0 (#957) 2026-03-24 10:53:57 +09:00
エリス 44e095f45b chore(dev-deps): bump @cordova/eslint-config to 6.0.1 w/ fixes (#956)
* chore(devDeps): bump @cordova/eslint-config to ^6.0.1
* chore(package-lock): update w/ npm update command
2026-03-24 10:21:38 +09:00
Manuel Beck 59f421982f refactor(ios): processPHPickerImage: and retrieveImage: (#952)
- Remove redundant image processing code in `processPHPickerImage:`, which is already done in `retrieveImage:`
- Improve documentation
2026-02-04 14:57:51 +01:00
Manuel Beck 1848db07ef ios: rename property pickerController to cdvUIImagePickerController (#949)
- Make clear that is a `CDVUIImagePickerController`
2026-01-30 19:19:49 +01: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 3c1268531e fix(ios): get correctly metadata with PHPicker (#944)
- `pickerResult.assetIdentifier` was wrongly used to get metadata, while `PHPickerConfiguration` was initialized with `init` which will not return any asset identifiers. Only `initWithPhotoLibrary:` would work. Since `init` is more flexible and lets the picker return items that aren’t PHAssets (e.g., cloud/shared providers) we use that and do not rely anymore on `assetIdentifier` to get the image data. The image data will now get by `[NSItemProvider loadDataRepresentationForTypeIdentifier:]` instead of `[PHImageManager requestImageDataAndOrientationForAsset:]`. The image data is needed to get meta data.
2026-01-29 20:11:08 +01:00
Manuel Beck fe1896cf1e doc(ios): Document PHPickerConfigurationAssetRepresentationModeCurrent (#945) 2026-01-29 19:31:30 +01:00
Manuel Beck d731cb9ad3 fix(ios): don't copy temporary video file on main thread and cleanup (#942)
- A user commented that`window.resolveLocalFileSystemURL` will fail when using the uri result for picking a video with PHPicker: https://github.com/apache/cordova-plugin-camera/issues/935#issuecomment-3742776758. The temporary video file provided by PHPickerViewController gets deleted when the completion handler exits. The copying of the video file was wrongly done on the main thread, rather than on the completion handler background thread.
- Report error to webview, if the video file could not successful copied to the temp directory

* Code refactoring and documentation

- Renamed `createTmpVideo` to `copyFileToTemp`, since it has no special code for just video files
- Log errors, if something is wrong in `copyFileToTemp `
- Document property `hasPendingOperation`
- Remove `dispatch_async` for returning `CDVPluginResult`. Internally, `CDVCommandDelegate` has a queue of plugin messages to send and it ensures that those are always sent to the webview on the main thread.
- Only use `dispatch_async(dispatch_get_main_queue(), ...` for UI operations
- Some minor code formatting for calling `CDVPluginResult` initializer
- Removed method `urlTransformer` which was deprecated in cordova-ios 8 and has no use anymore
- Removed unused method `integerValueForKey`: This method is legacy and was nowhere used
- Resolve method `processPHPickerImage`. This extra method is not needed
- Replace `IsAtLeastiOSVersion` with `@available`, `IsAtLeastiOSVersion` is deprecated
- Remove `IsAtLeastiOSVersion(@"8.0")` check for [locationManager requestWhenInUseAuthorization]. This plugins supports minimum iOS 11.
- Documentation and small refactoring regarding gettting GPS location for capturing JPEGs
- Use modern code for working with dictionaries
- fix: deprecation of `requestImageDataForAsset:options:resultHandler:`, which was deprecated in iOS 13. Replaced with `requestImageDataAndOrientationForAsset:options:resultHandler:`, which was introduced in iOS 11.

* Some cleanup regarding temporary file handling

- Renamed `createTmpVideo`to `copyFileToTemp` and keep the method generic, since it has no special code for video files
- Renamed `tempFilePath` to `tempFilePathForExtension`, since it creates unique path only for a file extension
- Document `tempFilePathForExtension`
- Refactoring and documentation of method `cleanup:`
- Moved `cleanup`, `tempFilePath` and `copyFileToTemp` at one place, since they are related
- creating unique temporary files with milliseconds: This is more precise than just using seconds
2026-01-29 14:08:55 +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
Manuel Beck 599954887b chore(ci): update obsolete XCode versions, add iOS 18 and 26 (#938)
- XCode 13 and 14 is not available anymore, replaced it with XCode 15
- Added tests for iOS 18 and 26
2026-01-12 15:43:09 +01:00
Manuel Beck 80a2f18a05 chore!: bump 9.0.0-dev and cordova-ios to 7.0.0 (#939)
- Increased cordova-ios version to 7.x to make newer features availabe
- Removed wrong cordovaDependency for `5.0.4-dev`. `cordovaDependencies` matches only against npm released versions.
2025-12-08 16:32:50 +01:00
Norman Breau 8864262022 fix(android): Error propagation when no Camera application is available (#926) 2025-03-20 16:13:02 -03:00
エリス b002b48735 chore: remove trailing whitespace (#921) 2025-01-15 16:03:14 +09:00
Norman Breau 979155ee98 chore: 8.0.1-dev 2024-10-30 11:12:59 -03:00
Norman Breau 7f33ef4add chore: version 8.0.0 8.0.0 rel/8.0.0 2024-10-30 11:08:58 -03:00
Norman Breau 4c9dc10512 deprecation: allowEdit (#914)
* deprecation: allowEdit

* applied suggestions to verbiage
2024-10-30 09:48:20 -03:00
Norman Breau de468b6f63 fix: Remove WRITE_EXTERNAL_PERMISSION (#915) 2024-10-29 01:15:50 -03:00
Norman Breau 48c4cdd47f refactor(android): Make WRITE_EXTERNAL_STORAGE optional (#909)
* refactor(android): Rework permission management to make WRITE_EXTERNAL_STORAGE optional

* removed unused getPermissions API

* Proper error if WRITE_EXTERNAL_STORAGE is required but missing the declaration

* removed obsolete hasPermissions API
2024-10-28 15:21:37 -03:00
Norman Breau 7d159cf3c9 docs: Revisions for v8 public API changes with the return string formats of getPicture (#913) 2024-10-28 14:01:04 -03:00
Norman Breau c208754c08 refactor(android): remove query img usage (#907)
* refactor: remove unnecessary duplicate image checks and queryImgDb usage

* remove unused imageType parameter, because it's a private API anyway
2024-10-28 13:32:35 -03:00
Norman Breau 0d86764b90 refactor(android): replace image path usage with image uris (#906)
* refactor(android): clean up image file path usages

* removed references of image paths in log messages
2024-10-28 12:35:50 -03:00
Norman Breau 7adccc8ee9 fix(ios): Sync camera API return to match Android changes (#911) 2024-10-27 08:32:38 -03:00
Norman Breau 53795454f4 fix(browser): Make data uri be returned as actual URI strings (#912) 2024-10-27 08:32:14 -03:00
Norman Breau 2eaa9a3972 fix: return content uris when possible when selecting from gallery (#902) 2024-10-26 00:58:24 -03:00
Norman Breau a672c31efb fix(android): Return data uris as an URI (#910) 2024-10-26 00:58:00 -03:00
Norman Breau 16325102c7 fix(android): Improper serialization of image uri in save instance state (#903) 2024-10-25 13:59:29 -03:00
Norman Breau 36bf8e7331 fix(android): improper cache path construction during image manipulation (#905) 2024-10-25 13:15:59 -03:00
Norman Breau feb7643bc3 fix(android): Use VERSION_CODES instead of hard-coded API literals (#904) 2024-10-25 13:10:05 -03:00
Norman Breau 44480300d9 fix(android): Isolate provider access to a subdirectory (#901) 2024-10-25 13:09:03 -03:00
ravi-yk faa4615ee0 Remove media permissions to make complaint with Android 14 requirements (#889)
Co-authored-by: Ravi Yakasiri <ravi.yakasiri@planonsoftware.com>
2024-10-24 13:38:18 -03:00
Norman Breau 0a4bfe1a74 chore: Update package to 8.0.0-dev (#899) 2024-10-21 09:38:35 -03:00
Norman Breau 49438dee6d chore: Update eslint config to 5.1.0 (#898) 2024-10-19 12:17:43 -03:00
jcesarmobile f38aba2b59 ci: sync workflow with paramedic (#895) 2024-08-08 12:16:56 +09:00
Norman Breau 3b73186b91 chore: Added npmrc 2024-07-27 01:30:29 -03:00
Norman Breau 40a5db10c7 ci(android): Update Android CI to be compatible with cordova-android@13 (#890) 2024-07-16 14:54:17 -03:00
Erisu 9eecbaa1af chore: bump version 7.0.1-dev 2023-09-06 17:02:23 +09:00
Erisu 24839eb71f release(camera-v7.0.0): updated version and RELEASENOTES.md 7.0.0 rel/7.0.0 2023-09-06 16:55:23 +09:00
エリス 64bd32d641 ci(gh-action): sync with paramedic configs (#851) 2023-09-06 02:27:41 +09:00
jcesarmobile 0796f784c1 chore: remove windows/osx from plugin.xml (#850) 2023-09-01 02:12:00 +02:00
jcesarmobile 20293f3d64 fix!: remove deprecated platforms (#848) 2023-09-01 00:34:30 +02:00
jcesarmobile 8cb34e1175 chore: Update SUPPORT_QUESTION.md template (#849) 2023-08-30 23:35:39 +02:00