가이드
환경 변수에 대한 __CAPGO_KEEP_1__ 튜토리얼
capgo를 사용하여 capacitor 환경 변수에 접근하는 플러그인
Capacitor plugin for accessing environment variables in native code.
이 플러그인이 제공하는 것
bun add @capgo/capacitor-env
bunx cap sync
- 특정 환경 변수의 키에 대한 값을 검색합니다.
getKey예시 사용
특정 환경 변수의 키에 대한 값을 검색합니다.
getKey
설치
import { Env } from '@capgo/capacitor-env';
const result = await EnvPlugin.getKey({ key: 'API_URL' });
console.log(result.value); // 'https://api.example.com'
전체 참조
- GitHub: https://github.com/Cap-go/capacitor-env/
- 문서: /docs/plugins/env/