# 카메라/앨범 불러오지 못함

**URL:** <https://techchat-apps-in-toss.toss.im/t/topic/77>\
**Category:** 개발\
**Created:** [9월 8, 2025, 2:06오전 UTC](https://techchat-apps-in-toss.toss.im/t/topic/77 "2025-09-08T02:06:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![goodlugg](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@goodlugg](https://techchat-apps-in-toss.toss.im/u/goodlugg)\
**Post date:** [9월 8, 2025, 2:06오전 UTC](https://techchat-apps-in-toss.toss.im/t/topic/77/1 "2025-09-08T02:06:07Z")

</div>

RN 0.0.39

openCamera, fetchAlbumPhotos 모두 권한 요청은 잘 되어 권한 설정이 되었으나 실제 카메라와 앨범이 불러와지지 않습니다

아무런 응답이 없습니다

---

<div class="post-metadata">

**Author:** ![Dylan](https://yyz1.discourse-cdn.com/flex007/user_avatar/techchat-apps-in-toss.toss.im/dylan/32/597_2.png) [@Dylan](https://techchat-apps-in-toss.toss.im/u/Dylan)\
**Post date:** [9월 8, 2025, 2:58오전 UTC](https://techchat-apps-in-toss.toss.im/t/topic/77/2 "2025-09-08T02:58:13Z")

</div>

안녕하세요 🙂  
bedrock.config.ts 에 권한 등록은 해주셨을까요 ?

```auto
      permissions: [
        {
          name: "photos",
          access : "read"
        },
        {
          name : "camera",
          access : "access"
        }

```

테스트 진행한 코드를 같이 전달드려요.

```tsx

const base64 = true;

function AlbumPhotoList() {
  const [albumPhotos, setAlbumPhotos] = useState<ImageResponse[]>([]);

  async function handlePress() {
    try {
      const response = await fetchAlbumPhotos({
        base64,
        maxWidth: 360,
      });
      setAlbumPhotos((prev) => [...prev, ...response]);
    } catch (error) {
      console.error('앨범을 가져오는 데 실패했어요:', error);
    }
  }

  return (
    <View>
      {albumPhotos.map((image) => {
        const imageUri = base64 ? 'data:image/jpeg;base64,' + image.dataUri : image.dataUri;

        return <Asset.Image key={image.id} source={{ uri: imageUri }} />;
      })}
      <Button onPress={handlePress}>앨범 가져오기</Button>
    </View>
  );
}

function Camera() {
  const [image, setImage] = useState<ImageResponse | null>(null);

  async function handlePress() {
    try {
      const response = await openCamera({ base64 });
      setImage(response);
    } catch (error) {
      console.error('사진을 가져오는 데 실패했어요:', error);
    }
  }

  // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.
  const imageUri = base64 ? 'data:image/jpeg;base64,' + image?.dataUri : image?.dataUri;

  return (
    <View>
      {image ? <Asset.Image source={{ uri: imageUri }} /> : <Text>사진이 없어요</Text>}
      <Button onPress={handlePress}>사진 촬영하기</Button>
    </View>
  );
}

export function Index() {
  const [open, setOpen] = useState(false);
  return (
    <>
      {/* 카메라 / 앨범 테스트 섹션 */}
      <View>
        <Text>카메라 테스트</Text>
        <Camera />
      </View>

      <View>
        <Text>앨범 리스트 테스트</Text>
        <AlbumPhotoList />
      </View>
    </>
  );
}

```
