Configure the SDK
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.
- Using the
Access Token
,App ID
,App Endpoint
, andMID
values noted when you Setup Push Apps, configure the SDK in your application.
- Enable or disable
analytics
,location
, orinbox
entries depending on the unique needs of your application and your usage of Marketing Cloud.
Note: iOS Data Protection affects the SDK as follows:
- No protection - SDK works in foreground & background
- Complete until first user authentication - SDK works in foreground & background after 1st unlock.
- Complete unless open - SDK works in foreground & background after 1st unlock.
- Complete - SDK works only in the forground after the device is unlocked.