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

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

fattanasio opened a new issue #622:
URL: https://github.com/apache/cordova-plugin-camera/issues/622


   # 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] timbru31 commented on issue #622: Can't access to file photolibrary with cordova ios 6.1.0 and wkwebview

Posted by GitBox <gi...@apache.org>.
timbru31 commented on issue #622:
URL: https://github.com/apache/cordova-plugin-camera/issues/622#issuecomment-654787805


   One issue is more than enough. Since you've provided more information, I'll close #621 instead.


----------------------------------------------------------------
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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] dolin-tan commented on issue #622: Can't access to file photolibrary with cordova ios 6.1.0 and wkwebview

Posted by GitBox <gi...@apache.org>.
dolin-tan commented on issue #622:
URL: https://github.com/apache/cordova-plugin-camera/issues/622#issuecomment-656580859


   There is no imagedata in the callback after the photo is taken successfully in wkwebview


----------------------------------------------------------------
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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] jcesarmobile closed issue #622: Can't access to file photolibrary with cordova ios 6.1.0 and wkwebview

Posted by GitBox <gi...@apache.org>.
jcesarmobile closed issue #622:
URL: https://github.com/apache/cordova-plugin-camera/issues/622


   


----------------------------------------------------------------
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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] jcesarmobile commented on issue #622: Can't access to file photolibrary with cordova ios 6.1.0 and wkwebview

Posted by GitBox <gi...@apache.org>.
jcesarmobile commented on issue #622:
URL: https://github.com/apache/cordova-plugin-camera/issues/622#issuecomment-659357799


   If using a custom scheme, the WebView won't allow to load file urls in img/video tags (nor fetch them, nor anything).
   cordova-ios added a helper method to convert file urls to urls that have the scheme and the WebView can understand.
   
   `window.WkWebView.convertFilePath('your/file/path');`
   
   I've created an issue in cordova-ios to document it https://github.com/apache/cordova-ios/issues/947


----------------------------------------------------------------
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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org