# Is \`usePlatformService().fileService.openCamera()\` not available on development?

**URL:** <https://community.sendbird.com/t/is-useplatformservice-fileservice-opencamera-not-available-on-development/5820>\
**Category:** React Native\
**Tags:** group-channel, chatsdk\
**Created:** [October 26, 2022, 1:28pm UTC](https://community.sendbird.com/t/is-useplatformservice-fileservice-opencamera-not-available-on-development/5820 "2022-10-26T13:28:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cory\_Cunningham](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/cory_cunningham/32/3017_2.png) [@Cory\_Cunningham](https://community.sendbird.com/u/Cory_Cunningham)\
**Post date:** [October 26, 2022, 1:28pm UTC](https://community.sendbird.com/t/is-useplatformservice-fileservice-opencamera-not-available-on-development/5820/1 "2022-10-26T13:28:58Z")

</div>

**[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.

```nohighlight
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.
