iOS SDK: Configuration Fields

Example of a configuration object

let configuration = try MBConfiguration(
  endpoint: "Endpoint External ID",
  domain: "api.maestra.io",
  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.maestra.io",
    subscribeCustomerIfCreated: true
  )

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

Mandatory fields

Maestra’s API domain

This is the domain used to call Maestra’s API — use api.maestra.io for all projects.

Endpoint External ID

This is the integration endpoint ID used to call project methods. Your Maestra Forward Deployed Marketer will specify this ID in your Integration Guide.

subscribeCustomerIfCreated

If you create an anonymous customer at SDK initialization, make sure that the mobile push subscription status is specified. This value is set in the configuration used to initialize the SDK.

Additional configuration fields

shouldCreateCustomer

This field determines whether an empty user should be created when the library is initialized.

Available values: True / False
Default value: True

If you leave True, Maestra 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.

Set this field to False when your app onboarding asks the user for their subscription preference. In this case, you can control which data is transmitted when the customer is created.

Configuration fields used when upgrading from an older integration version

If you’re migrating from an older mobile push integration that used installationID, you can use additional configuration parameters to provide the customer’s previous data.

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

the installationID obtained as part of the legacy integration

previousDeviceUUID

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