react-native-image-crop-picker
react-native-image-crop-picker copied to clipboard
IOS can only select preselected photos
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
-
ImagePicker.openPicker({ forceJpg: true, compressImageMaxWidth: 300, compressImageMaxHeight: 300, compressImageQuality: 0.8, width: 300, height: 300, cropping: true, mediaType: 'photo', })
-
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
At least if there was an option to re-request the permission.
@Kiura hi, have you find a workaround for this issue? facing the same issue too
@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.
I have same issue, Someone find answear ?
@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?
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,
...
});
},
);
Having the same issue
I use the library to pick the image using this method:
launchImageLibrary
, Then I userImagePicker.openCropper
to crop the imagelaunchImageLibrary({...}, 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!
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...