Type Method

configure(withAPIKey:appUserID:)

Configures an instance of the Purchases SDK with a specified API key and app user ID.

Declaration

@discardableResult @objc(configureWithAPIKey:appUserID:) static func configure(withAPIKey apiKey: String, appUserID: String?) -> Purchases

Return Value

An instantiated Purchases object that has been set as a singleton.

Parameters

apiKey

The API Key generated for your app from https://app.revenuecat.com/

appUserID

The unique app user id for this user. This user id will allow users to share their purchases and subscriptions across devices. Pass nil or an empty string if you want Purchases to generate this for you.

Discussion

The instance will be set as a singleton. You should access the singleton instance using shared

See Also

Configuring the SDK