使用应用内购买
了解如何在 Expo 应用中使用应用内购买。
应用内购买(IAP)是指用户在移动或桌面应用内进行的交易,可以购买数字商品或额外功能。本指南提供了在你的 Expo 应用中实现 IAP 的流行库和教程列表。
🌐 In-app purchases (IAP) are transactions within a mobile or desktop application where users can buy digital goods or additional features. This guide provides a list of popular libraries and tutorials for implementing IAP in your Expo app.
应用内购买库需要配置自定义原生代码。在使用 Expo Go 时,原生代码无法配置。相反,请创建一个开发构建,它允许在项目中使用原生库。
教程
🌐 Tutorial

使用 RevenueCat 在你的 Expo 应用中设置应用内购买和订阅。
使用react-native-purchases 库和 RevenueCat 的应用内购买和订阅入门指南。
库
🌐 Libraries
以下库为应用内购买功能提供强大的支持,并与使用 CNG 和 Config Plugins 的 Expo 应用实现开箱即用的兼容性,便于在你的应用中无缝集成。
🌐 The following libraries provide robust support for in-app purchase functionality and out-of-the-box compatibility with Expo apps using CNG and Config Plugins for seamless integration in your app.
react-native-purchasesAn open-source framework that provides a wrapper around Google Play Billing and StoreKit APIs, and integration with RevenueCat services supporting in-app purchases. It enables product management, analytics, and simplified workflows for in-app purchase requirements that may extend beyond your client code, such as validating purchases on an app's backend.
expo-iapA React Native library for in-app purchases that works with development builds.