Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.imagePicker.getPictures return null error in iOS 13 #280

Open
Ramprasathselvam opened this issue Dec 2, 2019 · 5 comments
Open

Comments

@Ramprasathselvam
Copy link

Ramprasathselvam commented Dec 2, 2019

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

@Pranav-Suresh
Copy link

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

@HasanMhdAmin
Copy link

Any update?

@myyue214
Copy link

anyone help

@Ramprasathselvam
Copy link
Author

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) })
    }

@satish0563
Copy link

anyone help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants