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 2022/03/22 08:30:53 UTC
[GitHub] [cordova-plugin-camera] erisu commented on issue #702: No result with mediaType SAVEDPHOTOALBUM and enabled CameraUsesGeolocation (iOS)
erisu commented on issue #702:
URL: https://github.com/apache/cordova-plugin-camera/issues/702#issuecomment-1074875558
I am unable to reproduce this issue with the current master branch.
I will close out this issue as unreproducible.
If you are still experiencing the issue with master branch, please create a new ticket and:
1. create and link a simple reproduction repo.
2. provide additional steps, if necessary, to run the reproduction repo to see the issue.
### Code Sample:
**Simple JavaScript `index.js`**
```javascript
document.addEventListener('deviceready', onDeviceReady, false);
function onDeviceReady() {
// encodingType: Camera.EncodingType.JPEG,
const cameraOptions = {
quality: 100,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM,
mediaType: Camera.MediaType.PICTURE,
saveToPhotoAlbum: false
}
function onSuccess(result) {
var image = document.getElementById('myImage');
image.src = result;
}
function onFail(message) {
alert('Failed because: ' + message);
}
document.getElementById('cameraTakePhoto').onclick = function() {
navigator.camera.getPicture(onSuccess, onFail, cameraOptions);
};
}
```
**iOS `config.xml` Snippet**
```xml
<platform name="ios">
<preference name="CameraUsesGeolocation" value="true" />
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
<string>need camera access to take pictures</string>
</edit-config>
<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
<string>need photo library access to get pictures from there</string>
</edit-config>
<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>need location access to find things nearby</string>
</edit-config>
<edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge">
<string>need photo library access to save pictures there</string>
</edit-config>
</platform>
```
--
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: issues-unsubscribe@cordova.apache.org
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