Cordova camera plugin IOS 11 impossible to pick image from library

Viewed 1450

I'm using ionic, Xcode and the cordova-plugin-camera to access to my iphone's library. It's running on IOS 11.1.2.

I guess all authorizations are all set but when I'm clicking on a pic from my image picker library (the image picker is displaying), I'm getting this error :

[discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}

Following this topic : PhotoPicker discovery error: Error Domain=PlugInKit Code=13 it appears this could be a lack of permission error.

As you can see below, the Info.plist is set, I can't find where my mistake is, any ideas ?

enter image description hereenter image description hereenter image description hereenter image description here

// FUNCTION TO OPEN MY IPHONE'S LIBRARY AND SELECT A PIC

$scope.takePic = function()
{
    navigator.camera.getPicture(
    function(uri){
        //console.log(uri);
    },

    function(){
    $ionicPopup.alert({
          title: 'Error',
          template: 'Impossible'
          });
    },
    {
     destinationType: 1,
     sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
     allowEdit: false,
     saveToPhotoAlbum: false,
     quality: 30,
     }
     );

};
<!--LINES ADDING IN MY CONFIG.XML TO SET THE INFO.PLIST FILE -->

<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 to 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 to photo library access to save pictures there</string>
</edit-config>

<!-- BUTTON THAT IS CALLING THE FUNCTION -->

<button ng-click="takePic()" style="font-weight:300;border-radius:10px 10px 10px 10px;" class="button button-positive button-block">Take picture</button>

1 Answers
Related