You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/07 11:07:09 UTC

[GitHub] [cordova] fattanasio opened a new issue #226: Can't access to file photolibrary with cordova ios 6.1.0 and wkwebview

fattanasio opened a new issue #226:
URL: https://github.com/apache/cordova/issues/226


   # Bug Report
   
   ## Problem
   I created a new standard with ios 6 to avoid rejecting the app from Apple.
   In the config.xml I entered:
   <preference name = "scheme" value = "app" />
   <preference name = "hostname" value = "localhost" />
   to be able to navigate in my application.
   When I call the camera plugin:
   
   `navigator.camera.getPicture(function(fileURI) {
   		previewFoto(fileURI, id);
   	}, function(error) {
   		captureFotoError(error, id);
   	},
   	{
   	quality: 20, 
   	sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY,
   	mediaType: navigator.camera.MediaType.PICTURE,
   	destinationType: navigator.camera.DestinationType.FILE_URI 
   	}
   );
   
   function previewFoto(fileURI,id){
       var thumbnailPhoto = document.getElementById('thumbnailPhoto_'+id);
       $("#thumbnailPhoto_"+id).addClass("thumbnail");
       thumbnailPhoto.src=fileURI;
   }
   `
   I can't see the preview. Before installing cordova ios 6 and therefore also wkwebview the application worked correctly. 
   Now I think there is a problem of link to the uri file of type file: //etc..../tmp/filename.jpg
   I have searched all the forums but I cannot understand how to point to a camera file directly in my app.
   I have cordova ios 6.1.0 and latest cordova-plugin-camera
   
   Do you have any suggestions ?
   Thanks so much !
   
   
   ### What is expected to happen?
   Preview of image retrieved by camera plugin
   
   
   ### What does actually happen?
   Preview is blank image. Probably error access to file://etc...../tmp/file
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   `navigator.camera.getPicture(function(fileURI) {
   		previewFoto(fileURI, id);
   	}, function(error) {
   		captureFotoError(error, id);
   	},
   	{
   	quality: 20, 
   	sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY,
   	mediaType: navigator.camera.MediaType.PICTURE,
   	destinationType: navigator.camera.DestinationType.FILE_URI 
   	}
   );
   
   function previewFoto(fileURI,id){
       var thumbnailPhoto = document.getElementById('thumbnailPhoto_'+id);
       $("#thumbnailPhoto_"+id).addClass("thumbnail");
       thumbnailPhoto.src=fileURI;
   }
   `
   
   
   ### Environment, Platform, Device
   The problem occurs on device IOS and on simulator xcode
   
   
   ### Version information
   CORDOVA IOS 6.1.0
   Cordova CLI version 9.0
   
   
   ## Checklist
   
   - [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
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org