Salesforce iOS Integration

Table of Contents

Overview

The Bluedot SDK integration for Salesforce Marketing Cloud enables mobile apps to take advantage of the power of the Marketing Cloud and the superior accuracy, Geofence, Geolines™, and BLE Beacon triggering capabilities of the Bluedot SDKs. This documentation describes the steps required to integrate the Bluedot Point iOS SDK and MarketingCloudSDK in an iOS App.

BluedotPointSDK-Salesforce integration

This integration depends on both Salesforce MarketingCloudSDK and Point iOS SDK. These dependencies are managed by a cocoapod and will be installed after executing pod install command. Salesforce MarketingCloudSDK v5.2.1 can be downloaded from https://github.com/salesforce-marketingcloud/MarketingCloudSDK-iOS/releases/tag/v5.2.1.

Salesforce iOS MarketingCloudSDK Integration

To integrate MarketingCloudSDK you need to add MarketingCloudSDKConfiguration.json file to your project.

[{
    "name": "production",
    "appid": "__your app id__",
    "accesstoken": "__your access token__",
    "marketing_cloud_server_url": "__your app endpoint__",
    "mid": "__your account mid__",
    "etanalytics": false,
    "pianalytics": false,
    "location": false,
    "inbox": false,
    "uselegacypiidentifier": true
}]

And then add MarketingCloudSDKConfiguration.json to Copy Bundle Resources in your target’s Build Phases settings.

You can find more information here.

Bluedot Point iOS SDK Integration

Requirements

  1. Device and Operating System: all Apple devices running iOS 10.0+ and GPS capability
  2. Operating Environment: Data connection (only authentication and rule download), location services and Bluetooth (optional, for Beacon only).
  3. Permissions: Background processing for location services, local notification.

To integrate PointSDK, please refer to the integration steps here.

The Bluedot/Salesforce Marketing Cloud integration

To trigger Bluedot events in Salesforce Marketing Cloud, please ensure that the Contact Key is passed into Bluedot via the CustomKey field with [BDLocationManager.instance setCustomEventMetaData]:


@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
 
    ...
    successful = [[MarketingCloudSDK sharedInstance] sfmc_configure:&error];
 
    [[MarketingCloudSDK sharedInstance] sfmc_setContactKey:@"__your_contactKey__"];
 
    [BDLocationManager.instance setCustomEventMetaData:@{@"ContactKey": [[MarketingCloudSDK sharedInstance] sfmc_contactKey]}];
    BDLocationManager.instance.sessionDelegate = self;
    BDLocationManager.instance.locationDelegate = self;
 
    [BDLocationManager.instance authenticateWithApiKey:@"__your_ApiKey__" requestAuthorization:authorizedAlways];
}

GitHub Sample Project

A sample project which demonstrates the integration of JB4A iOS SDK and Bluedot Point iOS SDK  is available on GitHub.

Created by Bluedot DevOps on February 24, 2018

Start the discussion