Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8234

iOS Camera gives empty snapshot result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • cordova-plugin-camera
    • iOS 8.1, iPhone 6/6+

    Description

      I get following error while I am taking the photo from iPhone camera.

      "Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates."

      My platform details. IOS 8.1.2, cordova 3.5,iPhone 6 Plus

      Please update the camera plugin as early as possible.

      Please refer the following JavaScript code.

       navigator.camera.getPicture(onSuccess, onFail, {
                                              quality:100,
                                              destinationType: Camera.DestinationType.FILE_URI,
                                              sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
                                              encodingType: Camera.EncodingType.JPEG,
                                              targetWidth:960,
                                              targetHeight:640
                                              });
      
      function onSuccess(imageURI){
        console.log(imageURI);
      }
      
      function onFail(){
         alert("Fail");
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pvagare pvagare
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: