[Question]
In implementing a custom Input component for out message groups I noticed that in development mode this code does not work. The camera module does not open and nothing happens.
const { fileService } = usePlatformService();
/// implementing use of `openSheet()` from `useBottomSheet()`
{
title: STRINGS.GROUP_CHANNEL.DIALOG_ATTACHMENT_CAMERA,
icon: "camera",
onPress: async () => {
console.log("fileService", JSON.stringify(fileService.openCamera));
const photo = await fileService
.openCamera({
mediaType: "all",
})
.catch((error) => {
if (error) {
toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, "error");
}
});
if (photo) {
onSendFileMessage(photo).catch((error) => {
toast.show(STRINGS.TOAST.SEND_MSG_ERROR, "error");
});
}
},
}
When logging photo
it just returns null
. This same issue is true for fileService.openMediaLibrary()
as well.
Update
I also checked in out staging environment and it’s showing the error Couldn't open camera
even though permissions are given properly.
[UIKit Version]
2.0.0
[Frequency]
every time
[Current impact]
Users aren’t able to upload images.