wymsee/cordova-imagePicker

window.imagePicker.getPictures return null error in iOS 13

Ramprasathselvam opened this issue · 5 comments

window.imagePicker.getPictures return null error in iOS 13
but same code works fine in below iOS 13

window.imagePicker.getPictures(
                function (results) {
                    if (results.length != 0) {
                        //
                    }
                }, function (error) { //error null
                    console.log('Error: ' + error);
                }, {
                maximumImagesCount: 2 
            }
            );

Screenshot 2019-12-02 at 12 03 32 PM

Hi Ram,
Did you get any solution for this problem?

Any update?

anyone help

I'm used cordova-plugin-mediaPicker plugin
https://www.npmjs.com/package/cordova-plugin-mediapicker-dmcsdk

try this

function SelectPhotosfromLibrary()
{
    var args = {
            'selectMode': 101, //101=picker image and video , 100=image , 102=video
            'maxSelectCount': 10, //default 40 (Optional)
            'maxSelectSize': 188743680, //188743680=180M (Optional) only android
        };

MediaPicker.getMedias(args, function (medias) {
            //medias [{mediaType: "image", path:'/storage/emulated/0/DCIM/Camera/2017.jpg', uri:"android retrun uri,ios retrun URL" size: 21993}]
            if (medias.length != 0) {
                for (var i = 0; i<medias.length; i++) {
                    console.log(medias[i].uri)
                    //window.resolveLocalFileSystemURI(medias[i].uri, SaveFilesToDirectory, resOnError);
                }
            }
            else {
                NotificationAlert('No photos Selected!');
            }
        }, function(e) { console.log(e) })
    }

anyone help