For native integration, simply follow the steps outlined under the installation and configuration section to quickly integrate the SDK into your app.
Install the following:
Xcode 12.0 or later
CocoaPods 1.10.0 or later
Make sure that your project meets these requirements:
Set up a physical iOS device or use the iOS simulator to run your app.
For integration via Cocoapods, please follow Cocoapods Integration Guide.
For integration via Swift Package Manager, please follow SPM Integration Guide.
For manual integration, please follow Manual Integration Guide.
The SDK supports biometric authentication (Touch ID / Face ID) in Admin mode
<key>NSFaceIDUsageDescription</key> <string>Why is my app authenticating using face id?</string>
Info.plist file. Failure to do so results in a dialog that tells the user your app has not provided the Face ID usage description.
Enable your app to automatically recognize Interactions in your app, by executing the following steps:
Complete the following steps to initialize the SDK.
Swift: ```swift import Thunderhead ``` Objective-C: ```objective-c @import Thunderhead; ```
To start tracking, capturing, and receiving Optimizations with the Thunderhead SDK in User mode, you must first initialize it with your Thunderhead API parameters. You can find your Thunderhead API parameters on the Thunderhead ONE website or in Salesforce Interaction Studio.
With your parameters ready at hand, add the following lines to the top of the
One.startSessionWithSK("ONE-XXXXXXXXXX-1022", uri:"myAppsNameURI", apiKey:"f713d44a-8af0-4e79-ba7e-xxxxxxxxxxxxxxxx", sharedSecret:"bb8bacb2-ffc2-4c52-aaf4-xxxxxxxxxxxxxxxx", userId:"api@yourCompanyName", adminMode:false, hostName:"eu2.thunderhead.com")
[One startSessionWithSK:@"ONE-XXXXXXXXXX-1022" uri:@"myAppsNameURI" apiKey:@"f713d44a-8af0-4e79-ba7e-xxxxxxxxxxxxxxxx" sharedSecret:@"bb8bacb2-ffc2-4c52-aaf4-xxxxxxxxxxxxxxxx" userId:@"api@yourCompanyName" adminMode:NO hostName:@"eu2.thunderhead.com"];
We recommend adding the Admin mode function on your internal builds, behind a debug settings function or on a dedicated build pipeline, as described here.
To use the framework in Admin mode, simply change the
adminMode boolean to
true, as follows:
One.startSessionWithSK("ONE-XXXXXXXXXX-1022", uri:"myAppsNameURI", apiKey:"f713d44a-8af0-4e79-ba7e-xxxxxxxxxxxxxxxx", sharedSecret:"bb8bacb2-ffc2-4c52-aaf4-xxxxxxxxxxxxxxxx", userId:"api@yourCompanyName", adminMode:true, hostName:"eu2.thunderhead.com")
[One startSessionWithSK:@"ONE-XXXXXXXXXX-1022" uri:@"myAppsNameURI" apiKey:@"f713d44a-8af0-4e79-ba7e-xxxxxxxxxxxxxxxx" sharedSecret:@"bb8bacb2-ffc2-4c52-aaf4-xxxxxxxxxxxxxxxx" userId:@"api@yourCompanyName" adminMode:YES hostName:@"eu2.thunderhead.com"];
You have now successfully integrated the codeless Thunderhead SDK for iOS.
When integrating with Salesforce Interaction Studio you can set the Admin mode theme to match the Interaction Studio look and feel, as follows:
Viewlifecycle overriding rules
The framework listens to a number of
UIView methods to provide the desired functionality. Those methods are:
If you use these methods in your code, please ensure to call super when implementing them.
In order to reduce the number of unnecessary Interaction requests sent automatically by the SDK, only codeless Interactions with explicit Interaction paths created under a Touchpoint and configured with at least one point are sent to Thunderhead ONE or Salesforce Interaction Studio. This configuration change has been introduced in version 5.3.0 of the iOS SDK.
For additional features of Thunderhead SDK, please follow Additional Features Guide.
Having trouble with Thunderhead and your iOS project? Visit the Troubleshooting Guide
For Salesforce Marketing Cloud Interaction Studio questions, please submit a support ticket via https://help.salesforce.com/home
The Thunderhead team is available 24/7 to answer any questions you have. Just email firstname.lastname@example.org or visit our docs page for more detailed installation and usage information.
|Last commit: 4 weeks ago|
armv7for iOS and
i386, x86_64for the simulator. For further details on this see our migration guide.