[ 
https://issues.apache.org/jira/browse/CB-14031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436774#comment-16436774
 ] 

Adam Szmyd commented on CB-14031:
---------------------------------

It seems like the message is being manually generated inside 
"imagePickerControllerDidCancel" method: 
[https://github.com/apache/cordova-plugin-camera/blob/7c90555bd4bfbbdfe23f357f130eb1bbb7e4fce6/src/ios/CDVCamera.m#L561]

Not sure what was the use case of checking permissions out there but according 
to Apple docs 
([https://developer.apple.com/documentation/uikit/uiimagepickercontrollerdelegate/1619133-imagepickercontrollerdidcancel)]
 the delegate itself is always fired when user cancels the selection so maybe 
all the method should do is to send "No Images Selected" error always.

Also XCode alerts about some depreactions since iOS9 which might be the case 
here 
([https://developer.apple.com/documentation/assetslibrary/alassetslibrary|https://developer.apple.com/documentation/assetslibrary/alassetslibrary):]):

!deprecations.png|width=938,height=303!

> iOS cancel action throws "has no access to assets" instead of "No Image 
> Selected" error
> ---------------------------------------------------------------------------------------
>
>                 Key: CB-14031
>                 URL: https://issues.apache.org/jira/browse/CB-14031
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-camera
>         Environment: iOS
>            Reporter: Adam Szmyd
>            Priority: Minor
>         Attachments: deprecations.png
>
>
> When cancelling action of getting image from photo library, an error "has no 
> access to assets" is being returned instead of "No Image Selected"
> Using simple call like that:
> {code:java}
> navigator.camera.getPicture(function () {
>     console.log('Success');
> }, function (error) {
>     console.error(error);
> }, {
>     sourceType: Camera.PictureSourceType.PHOTOLIBRARY
> });
> {code}
>  *This works properly using Camera capturing*



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to