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

Selecting photos from a Shared Album results in 'null' #56

Open
hanssens opened this issue Apr 1, 2015 · 5 comments
Open

Selecting photos from a Shared Album results in 'null' #56

hanssens opened this issue Apr 1, 2015 · 5 comments
Labels

Comments

@hanssens
Copy link

hanssens commented Apr 1, 2015

On iOS, when you select a not recently openend picture from a shared album, the getPictures() command returns null.

This can be demonstrated on iOS 8.2 with the following sample code:

window.imagePicker.getPictures(
    function (results) {
        for (var i = 0; i < results.length; i++) {
            console.log('Image URI: ' + results[i]);
        }
    }, function (error) {
        // note: in cases of a shared library this results simply in 'null'
        console.log('Error: ' + error);
    }
);

I have tested this in the case when having the Optimize Storage feature disabled. It seems that older pictures in a shared album, or pictures originating from another author (like a family member), are quite suitable to reproduce this bug. But this does not occur for all photos in a shared album.

@mattchete
Copy link

would be interested in a solution :)

@CSullivan102
Copy link
Contributor

It looks like the issue is when the full image isn't on the device (which I believe is the case with a shared album). I believe the ELCImagePickerController (which we use in this plugin), had this issue fixed, though I don't believe it's going and fetching the image, just handling the situation a bit better.

I'll try and get that change incorporated soon to be more predictable.

As far as actually fetching the image, it just isn't a super high priority for us, so I don't expect I'll get to that part soon, but we always welcome PRs!

@MrBasque
Copy link

MrBasque commented Apr 3, 2015

Can't wait! :)

@hanssens
Copy link
Author

As an update to this, the GMImagePicker plugin has fixed this by adding full iOS8 PhotoKit support. The lack of support for iOS 8's PhotoKit framework seems to be still an open issue with ELCImagePicker.

Therefor, some colleagues of mine have experimented with it and created a stable version of the ImagePicker where the ELC is replaced with GM. Also, we've added some features such as providing an array of return values containing both the original image path as well as a thumb path. So perhaps it's worth a look, @CSullivan102?

The GMImagePicker also has a downside where it requires iOS8 as a minimum, abandoning support for older OS versions.

@mrdevnet
Copy link

You can try to use update library with Photos library update for iOS 8 onwards with iCloud sync.
At https://github.com/amitbobade2007/ELCImagePickerController.
Forked from latest master branch and update for support.

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

No branches or pull requests

5 participants