And add the following to
Adapty.activate("PUBLIC_SDK_KEY", customerUserId: "YOUR_USER_ID")
- Public SDK key (required): found in your app settings in Adapty Dashboard App settings > General.
- Customer user ID (optional): an identifier of the user in your system. We send it in subscription and analytical events, to attribute events to the right profile. You can also find customers by
customerUserIdin the Profiles section.
If you don't have user IDs in your app, you can omit this parameter or pass null.
If you don't have a user ID at the time of Adapty initialization, you can set it later using
.identify()method. Read more in the Identifying Users section.
- Observer mode (optional): a boolean value controlling Observer mode. Turn it on if you handle purchases and subscription status yourself and use Adapty for sending subscription events and analytics.
Make sure you use the Public SDK key for Adapty initialization, the Secret key should be used for server-side API only.
SDK keys are unique for every app, so if you have multiple apps make sure you choose the right one.
Adapty logs errors and other important information to help you understand what is going on. There are three levels available:
.none(default): won't log anything
.errors: only errors will be logged
.verbose: method invocations, API requests/responses, and errors will be logged
You can set
logLevel in your app before configuring Adapty.
Adapty.logLevel = .verbose
Updated about 1 month ago