Google은 흑인 공동체를 위한 인종적 평등을 추구하기 위해 노력하고 있습니다. 자세히 알아보기

Enable In-App Purchases with RevenueCat

RevenueCat
Made by RevenueCat

Facilitates in-app purchases and subscriptions, controls access to premium content, and syncs purchase information to Firestore.

이 확장 프로그램의 작동 방식

RevenueCat’s app monetization platform empowers developers to confidently deploy in-app purchases and subscriptions, centralize data, and grow revenue. RevenueCat builds and adapts to the ever-changing needs of in-app purchase infrastructure, freeing app businesses to invest their time and resources in growing their product.

Install this extension to use Firebase services as your RevenueCat backend for in-app purchases on Apple App Store, Google Play Store, and Amazon Appstore.

The extension makes in-app purchases and subscriptions, controls access to premium content, and syncs customer purchase information to Firestore using RevenueCat.

This extension can:

  • Store purchase lifecycle events (e.g., trial starts, purchases, subscription renewals, billing issues) in Firestore and react to them.
  • Store and update information about customers and their purchases in Firestore.
  • Update information about customers' entitlements as Firebase Authentication Custom Claims.

RevenueCat supports both native iOS and Android apps as well as hybrid cross-platform apps in React Native, Flutter, Unity, Cordova, and Ionic.

You need to create a RevenueCat account or already have one set up to use this extension.

Events

This extension emits events, which allows you to listen to and run custom logic at different trigger points during the functioning of the extension. For example you can listen to events when a new subscription has been purchased via the initial_purchase event, or whenever a subscription or non-renewing purchase has been cancelled through the cancellation event.

Additional setup

Firebase

Before installing this extension, set up the following Firebase services in your Firebase project:

  • Cloud Firestore to store In-App Purchases & Subscriptions details.
  • Follow the steps in the documentation to create a Cloud Firestore database.
  • (optional) Firebase Authentication to enable different sign-up options for your users to enable Custom Claims management.
  • Enable the sign-in methods in the Firebase console that you want to offer your users.
RevenueCat
  • Create a RevenueCat Project if you haven't already.
  • Set up a Firebase integration in RevenueCat: Go to your project settings, and under "Integrations", click "Add", then "Firebase".
  • From the newly created integration, copy your shared secret. You will need this to set up the extension.
Mobile App

Follow the steps in the RevenueCat documentation to add the RevenueCat SDK to your mobile app. In addition, follow the instructions to set up the Firebase Integration inside the app by:

Billing

This extension uses the following Firebase services which may have associated charges:

  • Cloud Firestore
  • Cloud Functions
  • Cloud Secret Manager
  • If you enable events Eventarc fees apply.

This extension also uses the following third-party services:

You are responsible for any costs associated with your use of these services.

확장 프로그램 설치 방법

Firebase Console 사용

Firebase Console을 사용해 확장 프로그램을 설치하고 관리할 수 있습니다.

Console을 사용해 설치하기

Firebase CLI 사용

Firebase CLI를 사용해 확장 프로그램을 설치하고 관리할 수도 있습니다.

1단계: 다음 npm 명령어를 실행하여 CLI를 설치하거나 최신 CLI 버전으로 업데이트합니다.

npm install -g firebase-tools
작동하지 않는 경우 Firebase CLI 참조를 살펴보거나 npm 권한을 변경하세요.

2단계: 새 Firebase 프로젝트 디렉터리를 설정하거나 기존 디렉터리로 이동합니다.

3단계: 다음을 실행하여 이 확장 프로그램을 확장 프로그램 매니페스트에 추가합니다.

firebase ext:install revenuecat/firestore-revenuecat-purchases --local --project=projectId_or_alias

4단계(선택사항): Firebase 에뮬레이터 도구 모음으로 이 확장 프로그램을 로컬에서 테스트합니다.

firebase emulators:start

5단계: 매니페스트의 확장 프로그램을 프로젝트에 배포합니다.

firebase deploy --only extensions --project=projectId_or_alias
지원
Cloud Firestore Authentication
작성자
라이선스
apache-2.0
버전
0.1.1