# Native module도 제품 API다

> Modules API v2, config plugin, build profile과 artifact provenance

- Canonical: https://learning.reopt.ai/courses/expo-production/lessons/ex-m2-concept
- Language: ko-KR
- HTML: https://learning.reopt.ai/courses/expo-production/lessons/ex-m2-concept

---

[Expo 엔터프라이즈 프로덕션](/courses/expo-production) 2. Native 확장과 EAS Build 3 / 9

# Native module도 제품 API다

Modules API v2, config plugin, build profile과 artifact provenance
개념 학습 45 XP 9분

Expo Modules API는 Kotlin·Swift 기능을 JS에 노출하지만 경계가 느슨하면 타입·lifecycle·permission 결함이 앱 전체로 번집니다. native API는 최소 표면으로 설계하고 config plugin으로 설정을 코드화하며, development·preview·production profile을 서로 다른 신뢰 경계로 운영합니다.
같은 commit은 같은 binary를 만들어야 한다 Node·package manager·native toolchain 버전을 고정하고 credential과 secret은 빌드 서비스에서 주입합니다. artifact에는 commit, profile, runtimeVersion, dependency lock과 서명 주체를 추적할 수 있어야 합니다.

| 계층 | 설계 기준 | 파이프라인 증거 |
| Module API | typed input·explicit error·cleanup | unit·device contract test |
| Config plugin | idempotent native 설정 | prebuild diff |
| Build profile | dev·preview·prod 격리 | profile별 credential·env |
| Artifact | immutable·signed·traceable | commit·SBOM·provenance |

- 1 API 축소 native capability를 작은 typed contract로 노출합니다.

- 2 설정 코드화 수동 Xcode·Gradle 수정을 config plugin으로 옮깁니다.

- 3 Profile 격리 bundle ID·credential·env·distribution을 환경별로 분리합니다.

- 4 재현 검증 clean build와 artifact metadata로 동일 입력을 증명합니다.

실무에 남길 기준

- native module은 오류·권한 거부·앱 lifecycle을 명시적으로 모델링한다
- prebuild 결과를 수동으로 고치는 대신 config plugin의 멱등성을 검증한다
- production credential은 개발자 노트북이 아니라 승인된 build job만 사용한다

[이전](/courses/expo-production/lessons/ex-m1-quiz) 이해했어요 · 계속

---

에이전트용 사이트 안내: https://learning.reopt.ai/llms.txt · 사이트맵: https://learning.reopt.ai/sitemap.xml · 문의: https://learning.reopt.ai/contact
