iOS SDK: Configuration Fields

Example of a configuration object

let configuration = try MBConfiguration(
  endpoint: "Endpoint External ID",
  domain: "Domain API Mindbox",
  previousInstallationId: "Previous Installation Id",
  previousDeviceUUID: "Previous DeviceUUID",
  subscribeCustomerIfCreated: "Customer subscription status: TRUE / FALSE" 
)
do {
  //    SDK configuration
  let configuration = try MBConfiguration(
    endpoint: "my-awesome-app-endpoint",
    domain: "api.mindbox.cloud",
    subscribeCustomerIfCreated: true
  )

  Mindbox.shared.initialization(configuration: configuration)
} catch  {
  print(error);
}

Mandatory fields

Mindbox’s API domain

This is the domain used to call Mindbox’s API — use api.mindbox.cloud for all project.mindbox.cloud projects.

❗️

Make sure you do not submit your project address here!

Endpoint External ID

This is the integration endpoint ID used to call project operations. Your project manager will specify this ID in your Integration Specifications.

subscribeCustomerIfCreated

If the option to create a customer at SDK initialization is on, make sure that the mobile push subscription status is specified in this parameter.

This parameter must be coded. Use the "advanced" integration scenario, if, before creating an anonymous user, you want to ask the user whether they agree to receive push notifications.

Additional configuration fields

shouldCreateCustomer

In this field you indicate whether you need to create an empty user profile during library initialization.

Available values: True / False
Default value: True

If you leave True, Mindbox will create an empty user profile during library initialization.

If you change to False, no user profile will be created, and you will have to call a special API method to do that.

You should select False if you have a notification prompting users to confirm their subscription status during the app onboarding process. In this prompt you can manually specify which data to add to a new customer profile.

Configuration fields used when upgrading from an older integration version

Consider using additional configuration parameters to specify legacy customer data when you upgrade from an older version of a mobile push integration that uses installationID.

If specified, these parameters are used to find customers.

  • If found, details from the new integration are added to the matching customer profile.
  • If not, an anonymous customer is created.

Ignore these parameters if you had no integration with the mobile push channel before implementing the SDK or if devices do not store data.

previousInstallationId

This is the installationID parameter passed as part of the legacy integration.

previousDeviceUUID

This is the deviceUUID passed together with the installationID as part of the legacy integration.