iOS 실기기 샌드박스에서 PlatformConstants 못 찾아서 미니앱 mount 실패 (RN 0.84.0, framework 2.4.7)

이 글의 성격은 무엇인가요?

질문 / 문제 해결

내용을 설명해주세요

개발 환경

  • React Native 미니앱 (Granite 기반)
  • npm workspace 모노레포 (apps/toss/가 RN 미니앱, apps/admin/은 Next.js, apps/api/는 FastAPI 등)
  • macOS, Node 환경

사용 중인 SDK 버전 (모두 latest)

패키지 버전
@apps-in-toss/framework 2.4.7
@granite-js/react-native 1.0.23
babel-preset-granite 1.0.23
@toss/tds-react-native 2.0.3
react-native 0.84.0
react 19.2.3

테스트 환경

  • iOS 실기기 샌드박스 2026-03-11 빌드 (docs에 있는 QR로 설치)
  • iPhone 실기기 (iOS, light mode)
  • 같은 Wi-Fi 네트워크, 로컬 네트워크 권한 ON 확인
  • granite dev로 metro 서버 띄움 (http://0.0.0.0:8081 정상 응답)

증상

  • 미니앱 진입 → Metro 번들 다운로드 100%까지 정상 → 그 후 흰/검정 화면 (시스템 색 모드 따라 다름)
  • 폰 흔들기로 RN dev menu 호출 → 반응 없음 (mount 자체가 실패한 상태)
  • 4/27 검수에서도 같은 사유로 반려된 적 있음:

    “앱 스킴, 기능 스킴 접속 시 ‘잠시 문제가 생겼어요’ 화면이 노출되어 검수가 불가해요. 설정파일에 누락된 설정이 있을 경우 발생할 수 있어요. 설정 파일을 확인해주세요.”

Dev server 에러 로그

BUNDLE  ./index.js

ERROR [runtime not ready]: Invariant Violation:
  TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found.
  Verify that a module by this name is registered in the native binary.

LOG  Running "shared" with {"rootTag":11,"initialProps":{
  "isVisible":true,
  "loadingStartTs":1777781244167,
  "initialFontSize":"Large",
  "initialColorPreference":"light",
  "schemeUri":"intoss://politics-now",
  "networkStatus":"WIFI"
},"fabric":true}

ERROR [runtime not ready]: Invariant Violation:
  "shared" has not been registered. This can happen if:
  * Metro (the local dev server) is run from the wrong folder.
  * A module failed to load due to an error and AppRegistry.registerComponent wasn't called.

현재 granite.config.ts (docs 표준 minimal 패턴)

import path from 'node:path';
import { appsInToss } from '@apps-in-toss/framework/plugins';
import { defineConfig } from '@granite-js/react-native/config';

const monorepoRoot = path.resolve(__dirname, '../..');

export default defineConfig({
  scheme: 'intoss',
  appName: 'politics-now',
  plugins: [
    appsInToss({
      brand: {
        displayName: '정치는 지금',
        primaryColor: '#1E40AF',
        icon: 'https://api.politics-now.kr/static/brand/logo.png',
      },
      permissions: [],
    }),
  ],
  metro: {
    watchFolders: [monorepoRoot],
    resolver: {
      blockList: [/\.next\//, /apps\/admin\/.*/, /apps\/api\/.*/, /apps\/landing\/.*/, /apps\/mobile\/.*/],
    },
  },
});

현재 _app.tsx (InitialProps docs 표준 예제 그대로)

import { AppsInToss } from '@apps-in-toss/framework';
import { PropsWithChildren } from 'react';
import { InitialProps } from '@granite-js/react-native';
import { context } from '../require.context';

function AppContainer({ children }: PropsWithChildren<InitialProps>) {
  return <>{children}</>;
}

export default AppsInToss.registerApp(AppContainer, { context });

현재 babel.config.js

module.exports = {
  presets: ['babel-preset-granite'],
};

이미 시도한 것 (모두 같은 에러 재현)

  1. SDK 1.x → 2.x 마이그레이션 — @apps-in-toss/framework 2.0.5 → 2.4.7
  2. npx ait migrate react-native-0-84-0 실행 (변경사항 거의 없음)
  3. @granite-js/react-native, babel-preset-granite 1.0.4/1.0.3 → 1.0.23 (latest)
  4. babel.config.js 명시 생성 (presets: ['babel-preset-granite'])
  5. monorepo workspace 호환 metro 설정 (watchFolders, blockList) 추가
  6. _app.tsx를 docs InitialProps 표준 예제와 100% 동일하게 (<>{children}</>)
  7. granite.config.tstarget: '0.84.0', appType: 'general' 추가/제거 모두 시도 (결과 동일)
  8. metro cache 삭제 후 재시작 여러 번
  9. iOS 실기기 샌드박스 앱 강제 종료 후 재진입, 로컬 네트워크 권한 ON 확인
  10. 시스템 색 모드 변경 시도 (light/dark 모두 동일하게 mount 실패, 색만 다름)

핵심 의문

  1. PlatformConstants TurboModule이 native binary에 등록 안 됐다는 에러가 docs 표준 minimal 패턴에서도 동일하게 발생합니다. 우리가 놓친 설정/필수 파일이 있을까요?
  2. 4/27 검수 반려 사유 "설정파일에 누락된 설정"의 정확한 누락 항목을 docs에서 찾을 수 없습니다. 어떤 설정을 점검해야 하는지 안내 부탁드립니다.
  3. 현재 사용 중인 iOS 실기기 샌드박스(2026-03-11) 빌드가 RN 0.84.0 + framework 2.4.7 조합과 완전 호환되는 게 맞을까요? 동일 환경에서 정상 동작하는 RN 미니앱 사례가 있을까요?
  4. iOS 시뮬레이터용 빌드(2026-03-26)는 더 최신인데, 시뮬레이터에서는 정상 동작하는 케이스가 있을까요?

빌드 산출물

  • 로컬 build (ait build) 자체는 성공: 1837 modules, 0 errors | 0 warnings
  • .ait 3.6MB, RN 0.84.0 + RN 0.72.6 양쪽 빌드 정상
  • 새 build deploymentId: 019de9e3-55c9-7a4a-b9a7-44fd7c9c80a3 (콘솔 미업로드, 사용자 환경에서 mount 100% 실패하여 검토 요청 보류 중)

콘솔 정보

  • workspace ID: 6907 / mini-app ID: 25925 / appName: politics-now
  • 콘솔 빌드 내역의 마지막 검토 필요 빌드: 20260430-8
  • 노출 중단 banner: “정치는 지금이 정책 위반으로 토스앱에서 노출 중단됐어요. 노출을 재개하려면 새 버전을 출시해 주세요.”

도움 부탁드립니다. 추가 정보 필요하시면 알려주세요.

appName (선택)

politics-now

@wo123kr 님 안녕하세요

  1. 설정 파일 가이드 안내드립니다 (#)
  2. 업로드 드린 샌드박스와 시뮬레이터용 빌드에서 RN/WebView 모두 작동되고 있습니다
  3. 이전 SDK 적용 시에도 발생했던 이슈인가요?
    커뮤니티에 이력들을 확인해봤을때에는 PATH 문제 였던 것으로 확인됩니다.
    iOS에서 실행시 검은 빈(+흰색) 화면으로 멈추는 현상
  4. 노출 중단 배너 관련해서는 채널톡으로 문의 부탁드립니다