revenuecat by rawveg/skillsforge-marketplace
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill revenuecat提供跨 iOS、Android、Flutter、React Native 和 Web 平台,使用 RevenueCat 实现应用内订阅和购买的专家级协助。
当遇到以下情况时应触发此技能:
Swift (iOS)
import RevenueCat
Purchases.logLevel = .debug
Purchases.configure(withAPIKey: "your_public_api_key", appUserID: "user_123")
Kotlin (Android)
Purchases.logLevel = LogLevel.DEBUG
Purchases.configure(PurchasesConfiguration.Builder(this, "your_public_api_key").build())
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Flutter
await Purchases.setLogLevel(LogLevel.debug);
PurchasesConfiguration configuration = PurchasesConfiguration("your_public_api_key");
await Purchases.configure(configuration);
React Native
Purchases.setLogLevel(Purchases.LOG_LEVEL.DEBUG);
Purchases.configure({ apiKey: "your_public_api_key" });
Swift
let customerInfo = try await Purchases.shared.customerInfo()
if customerInfo.entitlements["pro"]?.isActive == true {
// 用户拥有高级访问权限
}
Kotlin
Purchases.sharedInstance.getCustomerInfoWith(
onSuccess = { customerInfo ->
if (customerInfo.entitlements["pro"]?.isActive == true) {
// 用户拥有高级访问权限
}
}
)
React Native
const customerInfo = await Purchases.getCustomerInfo();
if (customerInfo.entitlements.active["pro"] !== undefined) {
// 用户拥有高级访问权限
}
Swift
Purchases.shared.getOfferings { (offerings, error) in
if let packages = offerings?.current?.availablePackages {
self.display(packages)
}
}
Kotlin
Purchases.sharedInstance.getOfferingsWith({ error -> }) { offerings ->
offerings.current?.availablePackages?.let { packages ->
// 显示产品包
}
}
Swift
Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in
if customerInfo.entitlements["pro"]?.isActive == true {
// 解锁高级内容
}
}
Kotlin
Purchases.sharedInstance.purchase(
packageToPurchase = aPackage,
onError = { error, userCancelled -> },
onSuccess = { storeTransaction, customerInfo ->
if (customerInfo.entitlements["pro"]?.isActive == true) {
// 解锁高级内容
}
}
)
Swift
Purchases.shared.restorePurchases { customerInfo, error in
// 检查 customerInfo 以查看权益是否已激活
}
Kotlin
Purchases.sharedInstance.restorePurchases(
onError = { error -> },
onSuccess = { customerInfo ->
// 检查 customerInfo 以查看权益是否已激活
}
)
curl --request GET \
--url https://api.revenuecat.com/v1/subscribers/app_user_id \
--header 'Authorization: Bearer PUBLIC_API_KEY'
用户"有权"访问的功能、级别或内容。大多数应用使用单一权益(例如 "pro")。在 RevenueCat 仪表板中创建并与产品关联。当产品被购买时,其关联的权益将变为激活状态。
可供用户购买的产品集合。在仪表板中远程配置,允许您在不更新应用的情况下更改可用产品。通过 offerings.current 访问默认产品。
产品内产品的容器。包含便捷访问器,如 .monthly、.annual、.lifetime。每个产品包包含一个带有定价详情的 storeProduct。
包含用户所有订阅和购买数据的核心对象。通过 getCustomerInfo() 检索或在购买后返回。包含用于访问检查的 entitlements 字典。
每个用户的唯一标识符。可以在配置期间提供或自动生成为匿名 ID。用于跨设备同步购买。
此技能在 references/ 目录中包含全面的文档:
如需超出快速参考的详细实现模式,请查阅官方文档:https://www.revenuecat.com/docs/
purchase(package:) 添加购买按钮// 仅当用户没有活跃订阅时显示付费墙
if customerInfo.entitlements["pro"]?.isActive != true {
showPaywall()
}
if user.isPaidDownload {
packages = offerings?.offering(identifier: "paid_download_offer")?.availablePackages
} else {
packages = offerings?.current?.availablePackages
}
Purchases.logLevel = .debug)restorePurchases从官方来源提取的、包含详细解释和代码示例的整理文档。
在此处添加用于常见自动化任务的辅助脚本。
在此处添加模板、样板文件或示例项目。
每周安装数
223
仓库
GitHub 星标数
27
首次出现
2026年1月21日
安全审计
安装于
claude-code170
opencode168
codex166
gemini-cli161
github-copilot145
cursor134
Expert assistance for implementing in-app subscriptions and purchases using RevenueCat across iOS, Android, Flutter, React Native, and web platforms.
This skill should be triggered when:
Swift (iOS)
import RevenueCat
Purchases.logLevel = .debug
Purchases.configure(withAPIKey: "your_public_api_key", appUserID: "user_123")
Kotlin (Android)
Purchases.logLevel = LogLevel.DEBUG
Purchases.configure(PurchasesConfiguration.Builder(this, "your_public_api_key").build())
Flutter
await Purchases.setLogLevel(LogLevel.debug);
PurchasesConfiguration configuration = PurchasesConfiguration("your_public_api_key");
await Purchases.configure(configuration);
React Native
Purchases.setLogLevel(Purchases.LOG_LEVEL.DEBUG);
Purchases.configure({ apiKey: "your_public_api_key" });
Swift
let customerInfo = try await Purchases.shared.customerInfo()
if customerInfo.entitlements["pro"]?.isActive == true {
// User has premium access
}
Kotlin
Purchases.sharedInstance.getCustomerInfoWith(
onSuccess = { customerInfo ->
if (customerInfo.entitlements["pro"]?.isActive == true) {
// User has premium access
}
}
)
React Native
const customerInfo = await Purchases.getCustomerInfo();
if (customerInfo.entitlements.active["pro"] !== undefined) {
// User has premium access
}
Swift
Purchases.shared.getOfferings { (offerings, error) in
if let packages = offerings?.current?.availablePackages {
self.display(packages)
}
}
Kotlin
Purchases.sharedInstance.getOfferingsWith({ error -> }) { offerings ->
offerings.current?.availablePackages?.let { packages ->
// Display packages
}
}
Swift
Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in
if customerInfo.entitlements["pro"]?.isActive == true {
// Unlock premium content
}
}
Kotlin
Purchases.sharedInstance.purchase(
packageToPurchase = aPackage,
onError = { error, userCancelled -> },
onSuccess = { storeTransaction, customerInfo ->
if (customerInfo.entitlements["pro"]?.isActive == true) {
// Unlock premium content
}
}
)
Swift
Purchases.shared.restorePurchases { customerInfo, error in
// Check customerInfo to see if entitlement is now active
}
Kotlin
Purchases.sharedInstance.restorePurchases(
onError = { error -> },
onSuccess = { customerInfo ->
// Check customerInfo to see if entitlement is now active
}
)
curl --request GET \
--url https://api.revenuecat.com/v1/subscribers/app_user_id \
--header 'Authorization: Bearer PUBLIC_API_KEY'
A level of access, features, or content that a user is "entitled" to. Most apps use a single entitlement (e.g., "pro"). Created in the RevenueCat dashboard and linked to products. When a product is purchased, its associated entitlements become active.
The set of products available to a user. Configured remotely in the dashboard, allowing you to change available products without app updates. Access via offerings.current for the default offering.
Containers for products within an offering. Include convenience accessors like .monthly, .annual, .lifetime. Each package contains a storeProduct with pricing details.
The central object containing all subscription and purchase data for a user. Retrieved via getCustomerInfo() or returned after purchases. Contains the entitlements dictionary for access checks.
Unique identifier for each user. Can be provided during configuration or auto-generated as an anonymous ID. Used to sync purchases across devices.
This skill includes comprehensive documentation in references/:
For detailed implementation patterns beyond the quick reference, consult the official documentation at https://www.revenuecat.com/docs/
purchase(package:)// Show paywall only if user doesn't have active subscription
if customerInfo.entitlements["pro"]?.isActive != true {
showPaywall()
}
if user.isPaidDownload {
packages = offerings?.offering(identifier: "paid_download_offer")?.availablePackages
} else {
packages = offerings?.current?.availablePackages
}
Purchases.logLevel = .debug)restorePurchases from user interaction (like a button tap)Organized documentation extracted from official sources with detailed explanations and code examples.
Add helper scripts here for common automation tasks.
Add templates, boilerplate, or example projects here.
Weekly Installs
223
Repository
GitHub Stars
27
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code170
opencode168
codex166
gemini-cli161
github-copilot145
cursor134
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
107,800 周安装