GitToTheHub commented on issue #935:
URL: 
https://github.com/apache/cordova-plugin-camera/issues/935#issuecomment-3596716878

   @ramesh0452 The code you posted in your issue is modificated code, because 
the callbacks are missing and you use `this.camera` to access the plugin. Also 
you don't use `Camera.PictureSourceType.PHOTOLIBRARY` to define the 
`sourceType` of the camera. Also the next time, please format your code with 
```` ```js ```` when you post example javascript code, so it's easier to read.
   
   Please create a new Cordova app with the Camera Plugin and test the Photo 
Library on your iPhone SE with default settings, so it's easier to sort out the 
problem:
   
   ```bash
   cordova create camera-test
   cd camera-test
   cordova platform add ios
   cordova plugin add cordova-plugin-camera
   ```
   
   `cordova platform add ios` will automatically use `cordova-ios` 8.0.0.
   
   Test the Photo Library:
   
   ```js
   navigator.camera.getPicture(
       // Success callback
       () => {
           alert('Picture taken successfully');
       },
       // Error callback
       () => {
           alert('Failed to take picture');        
       },
       // Camera options
       {
           quality: 50,
           destinationType: Camera.DestinationType.FILE_URI,
           sourceType: Camera.PictureSourceType.PHOTOLIBRARY
       }
   );
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to