Update: I managed to succesfully upgrade to SDK 27.0.1, and the issue persists. Again, I’ve removed node_modules
, restartet watchman, yarn-installed, restarted XDE and packager, re-installed Expo on simulator.
The exact onPress that is invoked looks like this:
onAddImagePressed = async () => {
const { status } = await Permissions.askAsync(Permissions.CAMERA);
if (status === 'granted') {
const result = await ImagePicker.launchImageLibraryAsync({
allowsEditing: true,
aspect: [4, 4],
quality: 1,
// @ts-ignore
base64: true,
mediaTypes: ImagePicker.MediaTypeOptions.Images,
});
if (!result.cancelled) {
this.props.onImageSelected(result);
} else {
console.log(TAG, `image selection cancelled\n`);
}
} else {
// show info to user
}
};
Pretty standard setup. Any help would be very much appreciated.
EDIT: I see my error now. Previously, asking for Permissions.CAMERA
would also ask for permission to the camera roll, but this must have changed since SDK 24. It works if I use Permissions.CAMERA_ROLL
instead.