react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

IOS can only select preselected photos

Open Kiura opened this issue 3 years ago • 9 comments

Version

Tell us which versions you are using: 0.36.2

  • react-native-image-crop-picker v0.36.2
  • react-native v0.64.1

Platform

Tell us to which platform this issue is related

  • iOS

Expected behaviour

Access to all photos

Actual behaviour

Only able to access preselected photos on the first launch

Steps to reproduce

  1. ImagePicker.openPicker({ forceJpg: true, compressImageMaxWidth: 300, compressImageMaxHeight: 300, compressImageQuality: 0.8, width: 300, height: 300, cropping: true, mediaType: 'photo', })

  2. Try to select a photo

Attachments

// stacktrace or any other useful debug info

Love react-native-image-crop-picker? Please consider supporting our collective: 👉 https://opencollective.com/react-native-image-crop-picker/donate

Kiura avatar Jun 22 '21 09:06 Kiura

At least if there was an option to re-request the permission.

Kiura avatar Jun 25 '21 10:06 Kiura

@Kiura hi, have you find a workaround for this issue? facing the same issue too

rzdev avatar Jul 01 '21 12:07 rzdev

@rzdev, Hi, I used react-native-image-picker to pick the images on iOS and after the user selects the image I use this library to allow users to crop the image.

Kiura avatar Jul 01 '21 21:07 Kiura

I have same issue, Someone find answear ?

muccurly avatar Jul 22 '21 12:07 muccurly

@rzdev, Hi, I used react-native-image-picker to pick the images on iOS and after the user selects the image I use this library to allow users to crop the image.

How do you use this library to crop the image from the other library? I don't see the code that allows you to use other file sources within this library. What's your method?

Seanmclem avatar Aug 10 '21 02:08 Seanmclem

I use the library to pick the image using this method: launchImageLibrary, Then I user ImagePicker.openCropper to crop the image

launchImageLibrary({...},
  async data => {
    if (!data || !data.assets || data.assets.length === 0 && data.didCancel) return;
    const asset = data.assets[0];
    const path = asset.uri || '';
    // TODO: a hack to make the cropper work
    await sleep(500);
    const image = await ImagePicker.openCropper({
      path: path,
      ...
    });
  },
);

Kiura avatar Aug 11 '21 17:08 Kiura

Having the same issue

osamabinsaleem avatar Aug 28 '21 08:08 osamabinsaleem

I use the library to pick the image using this method: launchImageLibrary, Then I user ImagePicker.openCropper to crop the image

launchImageLibrary({...},
  async data => {
    if (!data || !data.assets || data.assets.length === 0 && data.didCancel) return;
    const asset = data.assets[0];
    const path = asset.uri || '';
    // TODO: a hack to make the cropper work
    await sleep(500);
    const image = await ImagePicker.openCropper({
      path: path,
      ...
    });
  },
);

Hey I just wanted to check in to see if you ever found a better solution to this, thanks!

LucasClaude avatar Jun 21 '22 14:06 LucasClaude

Hey I just wanted to check in to see if you ever found a better solution to this, thanks!

unfortunately no, still using the hack...

Kiura avatar Jun 22 '22 00:06 Kiura