Companion

actual object Companion
expect object Companion
actual object Companion

Properties

Link copied to clipboard

App Store only. Set this property to true only if you’re transitioning an existing Mac app from the Legacy Mac App Store into the Universal Store, and you’ve configured your RevenueCat app accordingly. Contact RevenueCat support before using this.

Link copied to clipboard

Current version of the Purchases SDK

Link copied to clipboard
expect val isConfigured: Boolean

True if configure has been called and sharedInstance is set

actual val isConfigured: Boolean
Link copied to clipboard

Set a custom log handler for redirecting logs to your own logging system.

Link copied to clipboard
expect var logLevel: LogLevel

Configure log level. Useful for debugging issues with the lovely team @RevenueCat By default, LogLevel.DEBUG in debug builds, and LogLevel.INFO in release builds.

actual var logLevel: LogLevel
Link copied to clipboard
expect var proxyURL: String?

Set this property to your proxy URL before configuring Purchases only if you've received a proxy key value from your RevenueCat contact.

actual var proxyURL: String?
Link copied to clipboard

Singleton instance of Purchases. configure will set this. Will throw an exception if the shared instance has not been configured.

Link copied to clipboard

App Store only. Set this property to true only when testing the ask-to-buy / SCA purchases flow. More information available here.

Functions

Link copied to clipboard
expect fun canMakePayments(features: List<<Error class: unknown class>> = listOf(), callback: (Boolean) -> Unit)

Note: This method only works for the Google Play Store and App Store. There is no Amazon equivalent at this time. Calling from an Amazon-configured app will return true.

actual fun canMakePayments(features: List<<Error class: unknown class>>, callback: (Boolean) -> Unit)
Link copied to clipboard
expect fun configure(configuration: PurchasesConfiguration): Purchases

Configures an instance of the SDK with the specified configuration. The instance will be set as a singleton. You should access the singleton instance using sharedInstance.

Link copied to clipboard

Configures an instance of the SDK with the specified configuration builder. The instance will be set as a singleton. You should access the singleton instance using sharedInstance.