Configuration Options
UpdatedThe SDK consists of a few packages. You’ll get the most value out of Customer.io when you use all our packages together, but this lets you omit packages for features you don’t intend to use.
You’ll call configuration options before you initialize the SDK with SDKConfigBuilder
. When you initialize the SDK, you can pass configuration options. In most cases, you’ll want to stick with the defaults, but you might do things like change the logLevel
when testing updates to your app.
import CioDataPipelines
let config = SDKConfigBuilder(cdpApiKey: "YOUR_CDP_API_KEY") // Required
.migrationSiteId("YOUR_SITE_ID") // Required to migrate from a previous version
.autoTrackDeviceAttributes(true)
.region(.EU)
CustomerIO.initialize(withConfig: config.build())
Option | Type | Default | Description |
---|---|---|---|
cdpApiKey | string | Required: the key you'll use to initialize the SDK and send data to Customer.io | |
region | eu or us | us | Required if your account is in the EU region. |
migrationSiteId | string | Required if you're updating from 1.x: the credential for previous versions of the SDK. We use this key to send remaining tasks to Customer.io when your audience updates your app. | |
autoTrackDeviceAttributes | boolean | true | Automatically gathers information about devices, like operating system, device locale, model, app version, etc |
trackApplicationLifecycleEvents | boolean | true | Set to false if you don’t want the app to send lifecycle events like Application Opened |
logLevel | string | error | Sets the level of logs you can view from the SDK. Set to debug or info to see more logging output. |
inApp.siteId | string | Used to initialize the inApp package, and determines the workspace your in-app messages come from. | |
push.android.pushClickBehavior | string | activityPreventRestart | One of resetTaskStack , activityPreventRestart , activityNoFlags ; determines how to handle push clicks. |