내용으로 건너뛰기

Getting Started

GitHub

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.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

터미널 창
bun add @capgo/capacitor-age-range
bunx cap sync
import { AgeRange } from '@capgo/capacitor-age-range';

복사

API Overview

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);
}

나이 범위 요청 옵션

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[];
}

나이 범위 요청 결과

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;
}

나이 범위 요청 상태

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

AndroidUserStatus

Android 전용 Google Play 사용자 상태 값

export type AndroidUserStatus =
| 'VERIFIED'
| 'SUPERVISED'
| 'SUPERVISED_APPROVAL_PENDING'
| 'SUPERVISED_APPROVAL_DENIED'
| 'UNKNOWN'
| 'EMPTY';

이 페이지는 플러그인의 src/definitions.tspublic API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.

Capgo를 사용 중이라면 시작하기 API 대시보드와 API 운영을 계획하고 연결하세요. @capgo/capacitor-age-range 사용하기 @capgo/capacitor-age-range의 원시 기능을 사용하기 위해 API 개요 API 개요의 구현 세부 사항을 참조하세요. 소개 소개의 구현 세부 사항을 참조하세요. API 키 API 키의 구현 세부 사항을 참조하세요. 그리고 장치 장치의 구현 세부 사항을 참조하세요.