moridianmess opened a new issue #625:
URL: https://github.com/apache/cordova-plugin-camera/issues/625
# Bug Report
## Problem
### What is expected to happen?
When cancel is pushed within the camera plugin on iOS, the onError event is
triggered. This works on Android.
### What does actually happen?
Neither the onError or onSuccess events are called.
## Information
### Command or Code
```
const options: any = {
destinationType: 0,
sourceType: 2,
encodingType: 0,
quality: 70,
targetWidth: 768,
targetHeight: 1024,
allowEdit: false,
correctOrientation: true,
saveToPhotoAlbum: false,
};
this.camera
.getPicture(options)
.then(
(imageData) => {
// imageData is a base64 encoded string
},
(err) => {
if (
err == 'Camera cancelled.' ||
err == 'No Image Selected'
) {
return;
}
console.log('camera error: ' + err);
}
)
.catch((error) => {
console.log('camera catch: ' + error);
});
```
### Environment, Platform, Device
Ionic Angular (TS)
iOS
iPhone X / iPhone 11
### Version information
@[email protected]
@ionic-native/[email protected]
[email protected]
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Any help on this matter would be much appreciated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]