본문으로 바로가기

구매 Capacitor 플러그인

SDK를 사용하여 다중 플랫폼으로의 수익 창출을 위한 인앱 구독 및 구매를 implement하세요. RevenueCat SDK

설치

bun add @revenuecat/purchases-capacitor bunx cap sync
npm, pnpm 또는 yarn
  • npm install @revenuecat/purchases-capacitor
  • pnpm add @revenuecat/purchases-capacitor
  • yarn add @revenuecat/purchases-capacitor

Guide

Capacitor에서 구매를 사용하는 방법

capacitor을 사용하여 @revenuecat/purchases-capacitor

Capacitor에서 인앱 구매와 구독을 쉽게 만듭니다. iOS 및 Android 지원

설치

bun add @revenuecat/purchases-capacitor
bunx cap sync

이 플러그인이 노출하는 것

  • configure - API 키와 앱 사용자 ID와 함께 구매를 설정합니다.
  • getVirtualCurrencies - 현재 구독자의 가상 화폐를 가져옵니다.
  • invalidateVirtualCurrenciesCache - 가상 통화 캐시를 무효화합니다.
  • getCachedVirtualCurrencies - 현재 캐시된 값이 있다면 사용할 수 있습니다. 이 값은 가상 통화가 최소 한 번 이상 가져오거나 동등한 함수를 호출할 때까지 null로 유지됩니다.

예시 사용

configure

API 키와 앱 사용자 ID를 사용하여 Purchases를 설정합니다.

import { Purchases } from '@revenuecat/purchases-capacitor';

await Purchases.configure({} as PurchasesConfiguration);

getVirtualCurrencies

현재 구독자의 가상 통화를 가져옵니다.

import { Purchases } from '@revenuecat/purchases-capacitor';

await Purchases.getVirtualCurrencies();

invalidateVirtualCurrenciesCache

가상 통화 캐시를 무효화합니다.

import { Purchases } from '@revenuecat/purchases-capacitor';

await Purchases.invalidateVirtualCurrenciesCache();

getCachedVirtualCurrencies

- 현재 캐시된 값이 있다면 사용할 수 있습니다. 이 값은 가상 통화가 최소 한 번 이상 가져오거나 동등한 함수를 호출할 때까지 null로 유지됩니다.

import { Purchases } from '@revenuecat/purchases-capacitor';

await Purchases.getCachedVirtualCurrencies();

전체 참조

RevenueCat의 @revenuecat/purchases-capacitor를 사용하여 계속하세요.

__CAPGO_KEEP_1__를 사용하는 경우 @revenuecat/purchases-capacitor 을 사용하여 결제와 구매를 계획하고 그것을 Capgo Pricing과 연결합니다. Capgo Pricing 상품 워크플로우에 대한 Payment system @capgo/자연스러운 구매 @capgo/native-purchases @__CAPGO_KEEP_0__/native-purchases의 구현 세부 사항에 대한 Getting Started Getting Started의 구현 세부 사항에 대한 Revenue Playbook

FAQ

구매 플러그인 FAQ

Capacitor 앱에서 구매 플러그인을 설치하는 방법은 어떻게 되나요?

Run "bun add @revenuecat/purchases-capacitor" (or "npm install @revenuecat/purchases-capacitor"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@revenuecat/purchases-capacitor" in your app code.

@revenuecat/purchases-capacitor은 React, Vue 및 Angular과 함께 작동합니까?

예. Purchases는 Capacitor 패키지이므로 Ionic, React, Vue, Angular, Svelte 및 일반 JavaScript과 같은 모든 웹 프레임워크가 Capacitor 내부에서 작동합니다.

@revenuecat/purchases-capacitor은 어떤 Capacitor 버전을 지원합니까?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

@revenuecat/purchases-capacitor은 무료이며 오픈 소스인가요?

예. code의 원본은 https://github.com/RevenueCat/purchases-capacitor/ 에서 GitHub에 공개되어 있으며 npm에서 무료로 설치할 수 있습니다. 버그 보고서와 Pull Request는 환영합니다.

code을 업데이트할 수 있나요?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

구매 Ship Purchases는 앱 리뷰 기다리지 않고 변경할 수 있습니다

플러그인은 스토어 빌드에 포함된 후, Capgo 라이브 업데이트가 사용자에게 몇 분 만에 자바스크립트, HTML 및 CSS 변경 사항을 푸시합니다.

Capgo