question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

window.imagePicker.getPictures return null error in iOS 13

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

2reactions
Ramprasathselvamcommented, May 27, 2020

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) })
    }
0reactions
satish0563commented, Feb 2, 2021

anyone help

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error dismissing ImagePickerController - Apple Developer
I am working on top of the ARKit Demo App. I created a button that opens up my photo library so that I...
Read more >
[Image Picker plugin] [Image Picker plugin] its crashing on ios ...
Hello,. We were having a similar issue and solved it by adding a {disable_popover: true} option to the getPictures() function as proposed here:....
Read more >
Image is null after its picked by using image_picker package ...
Description: I'm using (image_picker: ^0.8.5+3) package to pick the images from gallery and camera and then upload them on backend server ...
Read more >
Selecting multiple images in a PhoneGap/Cordova app
selImages = function() { window.imagePicker.getPictures( function(results) { for (var i = 0; i < results.length; i++) { console.log('Image ...
Read more >
Image Picker and Image Cropper in Ionic Framework
ionic cordova plugin add cordova-plugin-image-picker ... getPicture(options) and the phone will display the Camera to the user so he can ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found