EasyApp

RevenueCat

了解在项目里配置 RevenueCat 的 apiKey、entitlementID、ChinaProxyURL

在哪里配置RevenueCat相关的Key

RevenueCat的配置代码也在 EasyAppSwiftUI/Constants/Constants.swift 文件中。这里您主要了解在哪里配置 RevenueCat 的 apiKey、entitlementID、ChinaProxyURL即可。

如何一步步集成 RevenueCat,我们会在集成/RevenueCat文档中详细介绍。

EasyAppSwiftUI/Constants/Constants.swift
enum Constants {

	//  ... 其他配置

	enum RevenueCat {
		///  The API key for your app from the RevenueCat dashboard: https://app.revenuecat.com
		static let apiKey = "your revenuecat api key"

		/// The entitlement ID from the RevenueCat dashboard that is activated upon successful in-app purchase for the duration of the purchase.
		static let entitlementID = "your revenuecat entitlement id"

		// Proxies & configuration for users in Mainland China
		// https://www.revenuecat.com/docs/getting-started/configuring-sdk
		static let ChinaProxyURL = "https://api.rc-backup.com/"
	}

	// ... 其他配置
}

提醒

如果您是中国大陆用户,您需要配置 ChinaProxyURL 的值。

EasyAppSwiftUI/Constants/Constants.swift
enum RevenueCat {
	// 这个值是 RevenueCat 官方提供的代理地址,用于在中国大陆地区使用 RevenueCat 服务。请不要修改。
	static let ChinaProxyURL = "https://api.rc-backup.com/"
}

关于这一块的说明,请参考 RevenueCat 文档

了解更多RevenueCat集成

Last updated on