__CAPGO_KEEP_4__
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트 복사
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-age-range`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/age-range/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치란?AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 스킬을 추가하려면 다음 명령어를 사용하세요:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins그런 다음 다음 명령어를 사용하세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-age-range` plugin in my project.만약 Manual Setup을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-age-rangebunx cap syncImport
제목이 "Import"인 섹션import { AgeRange } from '@capgo/capacitor-age-range';API 개요
제목이 "API 개요"인 섹션requestAgeRange
제목이 "requestAgeRange"인 섹션사용자의 나이 범위를 요청하세요.
안드로이드에서: Google Play Age Signals API (사용자에게 알림이 없습니다). iOS에서: 시스템 DeclaredAgeRange dialog를 표시합니다 (iOS 26.2 이상 필요).
import { AgeRange } from '@capgo/capacitor-age-range';
const result = await AgeRange.requestAgeRange({ ageGates: [13, 16, 18] });if (result.status === 'SHARING') { console.log('Age range:', result.ageLower, '-', result.ageUpper);}타입 참조
타입 참조RequestAgeRangeOptions
DeclaredAgeRangeOptionsDeclaredAgeRangeOptions
export interface RequestAgeRangeOptions { /** * Age thresholds for the request. * * On iOS: these are passed to `requestAgeRange(ageGates:)` as the * age boundaries presented in the system dialog. Common values: [13, 16, 18]. * * On Android: this parameter is ignored (Play Age Signals returns * predefined ranges: 0-12, 13-15, 16-17, 18+). * * @default [13, 16, 18] * @since 8.0.0 */ ageGates?: number[];}AgeRangeResult
DeclaredAgeRangeResultDeclaredAgeRangeResult
export interface AgeRangeResult { /** * The outcome status of the age range request. * * @since 8.0.0 */ status: AgeRangeStatus;
/** * Inclusive lower bound of the user's age range. * * Present when age data is available. * * @since 8.0.0 */ ageLower?: number;
/** * Inclusive upper bound of the user's age range. * * May be absent if the user is in the highest age bracket (e.g. 18+). * * @since 8.0.0 */ ageUpper?: number;
/** * How the age was declared/determined. * * On iOS: 'SELF_DECLARED' or 'GUARDIAN_DECLARED'. * On Android: 'SUPERVISED' (guardian-managed) or 'VERIFIED' (Google-verified 18+). * * @since 8.0.0 */ declarationSource?: DeclarationSource;
/** * Android-only. The user's Google Play verification status. * * @since 8.0.0 */ androidUserStatus?: AndroidUserStatus;
/** * Android-only. Effective date for the most recent guardian-approved change. * * @since 8.0.0 */ mostRecentApprovalDate?: string;
/** * Android-only. Install identifier for supervised installs in Google Play. * * @since 8.0.0 */ installId?: string;}AgeRangeStatus
DeclaredAgeRangeStatusDeclaredAgeRangeStatus
export type AgeRangeStatus = /** * The user shared their age range (iOS) or age signals are available (Android). */ | 'SHARING' /** * The user declined to share their age range. */ | 'DECLINED_SHARING' /** * The age range API is not available on this device/OS version. */ | 'NOT_AVAILABLE' /** * An error occurred while requesting the age range. */ | 'ERROR';DeclarationSource
'선언원천' 섹션나이 범위가 선언되거나 결정된 방법입니다.
export type DeclarationSource = /** The user self-declared their age (iOS). */ | 'SELF_DECLARED' /** A guardian declared the user's age (iOS Family Sharing or Android supervised). */ | 'GUARDIAN_DECLARED' /** Google has verified the user is 18+ (Android only). */ | 'VERIFIED' /** Source is unknown or not provided by the platform. */ | 'UNKNOWN';AndroidUserStatus
'안드로이드 사용자 상태' 섹션안드로이드 전용 구글 플레이 사용자 상태 값입니다.
export type AndroidUserStatus = | 'VERIFIED' | 'SUPERVISED' | 'SUPERVISED_APPROVAL_PENDING' | 'SUPERVISED_APPROVAL_DENIED' | 'UNKNOWN' | 'EMPTY';실제 원천
'실제 원천' 섹션이 페이지는 플러그인의 src/definitions.ts. upstream에서 변경된 경우 pubic API를 다시 동기화하세요.
Getting Started에서 계속 진행하세요
Getting Started에서 계속하기__CAPGO_KEEP_0__을 사용하는 경우 Getting Started API과 API 연동을 위해 capgo/capacitor-age-range @capgo/capacitor-age-range를 사용하세요. for the native capability in Using @capgo/capacitor-age-range, API 개요에서 구현 세부 정보를 참조하세요. for the implementation detail in API Overview, 소개에서 구현 세부 정보를 참조하세요. __CAPGO_KEEP_0__ 키 API 키에서 구현 세부 정보를 참조하세요. API __CAPGO_KEEP_0__ __CAPGO_KEEP_1__