Configure the SDK

See the SDK header MarketingCloudSDK/MarketingCloudSDK+Base.h (AppleDoc) for detailed documentation on SDK configuration methods.

This example uses the MarketingCloudSDK ConfigBuilder configuration method, as it is the most flexible means to support your application’s usage of MobilePush.

Configuration of the SDK using a JSON file (included in our GitHub repository) is deprecated. We encourage you to move existing implementations to the builder method. For more information on our configuration methods, see the AppleDoc).

All method names contain the prefix sfmc_. This convention allows the application implementing the SDK to avoid namespace collisions between the external libraries it uses. MarketingCloudSDK does not cause compile, link, or runtime collisions with other code your application implements. Review Apple’s documentation on customizing existing classes for further information.

  1. Using the Access Token, App ID, App Endpoint, and MID values noted when you Setup Push Apps, configure the SDK in your application.
  1. Enable or disable analytics, location, or inbox entries depending on the unique needs of your application and your usage of Marketing Cloud.

Note: iOS Data Protection affects the SDK as follows:

  1. No protection - SDK works in foreground & background
  2. Complete until first user authentication - SDK works in foreground & background after 1st unlock.
  3. Complete unless open - SDK works in foreground & background after 1st unlock.
  4. Complete - SDK works only in the forground after the device is unlocked.

Next Steps

Configure for Push