Integrate the iOS SDK for MXO in your App

Before you can deploy the integration, you must ensure the SDK is set up with the correct initialization parameters.

You can download the latest SDK and review the extended integration instructions from Github:

iOS SDK for MXO

SDK Deployment Target

The SDK deployment target is iOS 12.0 or higher. If your deployment target is lower, please contact our support team so we can understand how to best mitigate this.

Installation and Environment Setup

We provide the SDK as an embedded framework. You can integrate this using CocoaPods or Swift Package Manager.

The aim of the of the automatic integration is to produce two build variants:

  1. Admin mode. Admin mode provides you with an interface that lets you add Activity Capture Points to interactions and elements, Attribute Capture Points to elements, and preview your configuration before publishing it to your live environment.

    The Admin mode build should only be distributed internally to business users involved in MXO setup. This is your internal dev build.

  2. User mode. The User mode build should be made available through the App Store, when you are satisfied that all insights are being tracked in Admin mode and internal QA requirements have been met.
    Note: For more information, see Configure the SDK in User mode for App Store builds.

Step 1: Finding your Integration Parameters in MXO

You need to provide specific information about your MXO environment when integrating your mobile solution with the SDK. These integration parameters include:

  • Site Key (for your specific Space)
  • Touchpoint URI
  • Host name. Typically, this is https://na5.thunderhead.com or https://eu2.thunderhead.com.

Step 2: Define the SDK Initialization Parameters using the Integration Parameters for your Space

Initialize the SDK using the integration parameters specific to your MXO environment.

Example

Initialization parameters example for your iOS app.

let siteKey = "ONE-XXXXXXXX-6100"
let touchpointURI = "ios://myiOSAppBaseURI"
let hostName = "xx.thunderhead.com"
NSString *siteKey = @"ONE-XXXXXXXX-6100";
NSString *touchpointURI = @"ios://myiOSAppBaseURI";
NSString *hostName = @"xx.thunderhead.com";

Step 3: Initialize the SDK in Admin mode

Initialize the SDK in Admin mode and use this to create your Admin mode Build for internal distribution.

MedalliaMXO.configuration = MXOConfiguration { builder in
	builder.adminMode = true
	builder.siteKey = "ONE-XXXXXXXX-6100"	
	builder.touchpoint = URL(string: "ios://myiOSAppBaseURI")
	builder.host = URL(string: "xx.thunderhead.com")
}
MedalliaMXO.configuration = [MXOConfiguration initWithBuilder:^(MXOConfigurationBuilder * _Nonnull builder) {
	builder.adminMode = YES;
	builder.siteKey = @"ONE-XXXXXXXX-6100";
	builder.touchpoint = [NSURL URLWithString:@"ios://myiOSAppBaseURI"];
	builder.host = [NSURL URLWithString:@"xx.thunderhead.com"];
}];

Step 3: Initialize the SDK in User mode

Initialize the SDK in User mode and use this to create your User mode Build for publication to the Apple App Store.

MedalliaMXO.configuration = MXOConfiguration { builder in
	builder.adminMode = false
	builder.siteKey = "ONE-XXXXXXXX-6100"
	builder.touchpoint = URL(string: "ios://myiOSAppBaseURI")
	builder.host = URL(string: "xx.thunderhead.com")
}
MedalliaMXO.configuration = [MXOConfiguration initWithBuilder:^(MXOConfigurationBuilder * _Nonnull builder) {
	builder.adminMode = NO;
	builder.siteKey = @"ONE-XXXXXXXX-6100";
	builder.touchpoint = [NSURL URLWithString:@"ios://myiOSAppBaseURI"];
	builder.host = [NSURL URLWithString:@"xx.thunderhead.com"];
}];