- Opt an end-user out of or into tracking
- Capture data from other SDKs
- Disable
WKWebView
tracking - Late initialization and reconfiguration of the SDK
- Manually set a specific Interaction path
- Exclude an Interaction
- Disable automatic Interaction detection
- Send Interactions to Thunderhead ONE or Salesforce Interaction Studio
- Retrieve a response for an automatically triggered Interaction request
- Send Properties to Thunderhead ONE or Salesforce Interaction Studio
- Identity sync
- Ability to whitelist identity transfer links
- Ability to blacklist identity transfer links
- Disable automatic identity transfer
- Disable automatic outbound link tracking
- Send a location object
- Get a structure data
- Get Tid
- Get current configuration
- Access debug information
- Identify the framework version
- Clear the user profile
Follow any of the steps below to access further functions of the SDK.
You will typically use these functions to extend the codeless functionality, turn off specific codeless functions or if you are adopting a pure programmatic integration.
The following methods allow you to opt a user out of various levels of tracking and also opt them back in based on your app's privacy configuration.
Note:
- By default all
opt
options are set toopt:In
.
Use this option to opt an end-user out or in of all tracking.
To opt out an end-user from all tracking when the end-user does not give permission to be tracked in the client app, call the opt out method as shown below:
Swift:
One.opt(.out, forOptions: .allTracking)
Objective-C:
[One opt:Out forOptions:AllTracking];
Note:
- When you opt out a user from all tracking all of the other opt out options will be also opted out, tracking will stop and locally queued data will be removed.
- For instructions on how to completely remove a user's data from Thunderhead ONE or Salesforce Interaction Studio - see our api documentation.
To opt in an end-user for all tracking when the end-user gives permission to be tracked in the client app, call the opt in method as shown below:
Swift:
One.opt(.in, forOptions: .allTracking)
Objective-C:
[One opt:In forOptions:AllTracking];
Use this option to opt an end-user out or in of all keychain Tid storage.
To opt out an end-user of all keychain Tid storage, call the opt method as shown below:
Swift:
One.opt(.out, forOptions: .keychainTidStorage)
Objective-C:
[One opt:Out forOptions:KeychainTidStorage];
To opt in an end-user for all keychain Tid storage, call the opt method as shown below:
Swift:
One.opt(.in, forOptions: .keychainTidStorage)
Objective-C:
[One opt:In forOptions:KeychainTidStorage];
Use this option to opt an end-user out or in of all pasteboard Tid storage.
To opt out an end-user of all pasteboard Tid storage, call the opt method as shown below:
Swift:
One.opt(.out, forOptions: .pasteboardTidStorage)
Objective-C:
[One opt:Out forOptions:PasteboardTidStorage];
To opt in an end-user for all pasteboard Tid storage, call the opt method as shown below:
Swift:
One.opt(.in, forOptions: .pasteboardTidStorage)
Objective-C:
[One opt:In forOptions:PasteboardTidStorage];
Use this option to opt an end-user out or in of all city/country level tracking.
To opt out an end-user of all city/country level tracking, call the opt method as shown below:
Swift:
One.opt(.out, forOptions: .cityCountryDetection)
Objective-C:
[One opt:Out forOptions:CityCountryDetection];
To opt in an end-user for all city/country level tracking, call the opt method as shown below:
Swift:
One.opt(.in, forOptions: .cityCountryDetection)
Objective-C:
[One opt:In forOptions:CityCountryDetection];
To opt out an end-user of keychain Tid storage, pasteboard Tid storage and city/country level tracking but not of all tracking, use the following example:
Swift:
One.opt(.out, forOptions: .keychainTidStorage, .pasteboardTidStorage, .cityCountryDetection)
Objective-C:
[One opt:Out forOptions:KeychainTidStorage | PasteboardTidStorage | CityCountryDetection];
To opt in an end-user for all tracking, keychain Tid storage and city/country level tracking but not pasteboardTidStorage
, use the following example:
Swift:
One.opt(.in, forOptions: .allTracking, .keychainTidStorage, .cityCountryDetection)
Objective-C:
[One opt:In forOptions:AllTracking | KeychainTidStorage | CityCountryDetection];
Note:
- When opted out, tracking will stop and locally queued data will be removed.
- For instructions on how to completely remove a user's data from Thunderhead ONE or Salesforce Interaction Studio - see our api documentation.
To capture data from other SDKs, add the method signatures to Method Overrides
under Thunderhead Config
.
For example, given the class interface
@interface THAnalytics : NSObject
- (void)trackEventWithName:(NSString *)eventName properties:(NSDictionary *)properties;
- (void)logIdentityWithName:(NSString *)identityName parameters:(NSDictionary *)parameters;
- (void)logIdentityWithName:(NSString *)identityName;
@end
- To capture data from
class method
trackEventWithName:properties:
- To capture data from
instance method
logIdentityWithName:parameters:
- To capture data from
instance method
logIdentityWithName:
from THAnalytics
class, add the following to your app's Info.plist file
<key>Thunderhead Config</key>
<dict>
<key>Method Overrides</key>
<array>
<string>THAnalytics+trackEventWithName:properties:</string>
<string>THAnalytics-logIdentityWithName:parameters:</string>
<string>THAnalytics-logIdentityWithName:</string>
</array>
</dict>
The SDK will capture the data when the configured methods are invoked.
Note:
- The SDK will only send Codeless Interactions when the first argument (String) matches a configured interaction in the Interaction Map. For additional information, please refer Sending Interaction requests based on the Interaction map.
- When capturing data from class methods, use
+
betweenclass name
andmethod signature
. - When capturing data from instance methods, use
-
betweenclass name
andmethod signature
. - Interaction paths with spaces are replaced with an underscore to ensure the Interaction path is valid in ONE.
The table below illustrates the compatibility of Capturing data from other SDKs based upon the programming language used.
App (Language) | Other SDK (Language) | Captures Data |
---|---|---|
Objective-C | Objective-C | YES |
Objective-C | Swift | YES |
Swift | Objective-C | YES |
Swift | Swift | NO |
To disable WKWebView
codeless tracking, add the following to your app’s Info.plist file and set DisableWKWebViewTracking
to YES
(boolean value).
<key>Thunderhead Config</key>
<dict>
<key>Swizzling Options</key>
<dict>
<key>DisableWKWebViewTracking</key>
<true/>
</dict>
</dict>
Need to late initialize or reconfigure the SDK to support multiple regions in your app? - see details here.
The SDK automatically assigns an Interaction path to each view controller. To override the Interaction path that is created automatically, call your view controller and pass your desired Interaction path as a string to the view controller’s oneInteractionPath
property.
In your viewDidLoad
or any other view lifecycle methods, which come before viewDidAppear
, simply set an Interaction path as shown below:
Swift:
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view
self.oneInteractionPath = "/myCustomInteractionPath"
}
Objective-C:
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.oneInteractionPath = @"/myCustomInteractionPath";
}
Note:
- When setting the Interaction path programmatically please ensure the Interaction starts with a
/
and only contains letters, numbers and/or dashes.
You can exclude a specific view controller from being recognized as an Interaction by using the excludeInteractionPath
method.
In your viewDidLoad
or any other view lifecycle methods, which come before the viewDidAppear
method, simply set excludeInteractionPath
to true
as shown below:
Swift:
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view
self.excludeInteractionPath = true
}
Objective-C:
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.excludeInteractionPath = YES;
}
By default, excludeInteractionPath
returns false
.
You can disable automatic Interaction detection by calling the method disableAutomaticInteractionDetection:
and passing true
as a parameter, as shown below:
Swift:
One.disableAutomaticInteractionDetection(true)
Objective-C:
[One disableAutomaticInteractionDetection:YES];
An appropriate place to call the method might be under didFinishLaunchingWithOptions
in your application delegate.
By disabling automatic Interaction detection, the SDK will no longer automatically send Interaction requests as view controllers are presented on screen. It becomes your responsibility to send them when needed by using the send Interaction methods outlined below.
You can set this back to false at any point to restart automatic Interaction detection.
You can send an Interaction request programmatically by calling the sendInteraction
method and passing an Interaction path as a parameter as shown below:
Swift:
One.sendInteraction("/InteractionPath")
Objective-C:
[One sendInteraction:@"/InteractionPath"];
Note:
- This will send a POST request to Thunderhead ONE or Salesforce Interaction Studio. Only the tid from the response will be used by the SDK - all other response objects will be ignored.
- When sending Interaction requests programmatically please ensure the Interaction starts with a
/
and only contains letters, numbers and/or dashes.
You can send an Interaction request programmatically and retrieve its response by passing an Interaction path and a completion block as a parameters, as shown below:
Swift:
One.sendInteraction("/InteractionPath") { (response, error) -> Void in
if (error == nil) {
if let response = response {
One.processResponse(response)
}
}
}
Objective-C:
[One sendInteraction:@"/InteractionPath" withBlock:^(NSDictionary *response, NSError *error) {
if (!error) {
[One processResponse:response];
}
}];
The response can be passed to the processResponse
method as a parameter, as shown above. This method returns the response to the SDK to process - attaching any capture, track or optimize instructions to the Interaction.
Note:
- This will send a
POST
request to Thunderhead ONE or Salesforce Interaction Studio. - When sending Interaction requests programmatically please ensure the Interaction starts with a
/
and only contains letters, numbers and/or dashes.
You can retrieve a response for a specific automatically triggered Interaction request by adopting the OneInteractionResponseDelegate
protocol. Follow the instructions below in order to set up this functionality depending on the object’s class.
This functionality will not work if automatic Interaction detection is disabled. For retrieving the response in sending programmatic Interactions, see Send an Interaction request and retrieve the response.
-
Adopt the
OneInteractionResponseDelegate
protocol in the class definition:Swift:
class MyViewController: UIViewController, OneInteractionResponseDelegate
Objective-C:
@interface MyViewController() <OneInteractionResponseDelegate>
See example of usage here.
-
Set the
oneInteractionPath
value to the name of the Interaction you want to retrieve the response from, and assign the delegate.-
For
UIViewController
classes:Access the existing
oneInteractionPath
property and set its value to the name of the Interaction inviewDidLoad
.Swift:
override func viewDidLoad() { super.viewDidLoad() self.oneInteractionPath = "/InteractionPath" One.addInteractionResponseDelegate(self) }
Objective-C:
- (void)viewDidLoad { [super viewDidLoad]; self.oneInteractionPath = @"/InteractionPath"; [One addInteractionResponseDelegate:self]; }
-
For custom classes:
Declare the required
oneInteractionPath
string property and set its value to the name of the Interaction.Swift:
class YourObject: YourObjectClass, OneInteractionResponseDelegate { var oneInteractionPath: String! = "/InteractionPath" ... func configureOneInteractionResponseDelegate() { One.addInteractionResponseDelegate(self) } }
Objective-C:
@implementation YourObjectClass - (void)configureOneInteractionResponseDelegate { self.oneInteractionPath = @"/InteractionPath"; [One addInteractionResponseDelegate:self]; }
See example of usage here.
Note:
- The SDK will weakly store your object, so you need to keep a strong reference to it somewhere.
-
-
Implement the protocol’s required method:
Swift:
func interaction(_ interactionPath: String!, didReceiveResponse response: [AnyHashable : Any]!) { if (response != nil) { // Work with the response. /* Pass on the response to Thunderhead SDK. This method returns the response to the SDK to process - attaching any capture, track or optimize instructions to the Interaction. */ One.processResponse(response) } }
Objective-C:
- (void)interaction:(NSString *)interactionPath didReceiveResponse:(NSDictionary *)response { if (response) { // Work with the response. // Pass on the response to Thunderhead SDK. This method returns the response to the SDK to process - attaching any capture, track or optimize instructions to the Interaction. [One processResponse:response]; } }
The method returns an Interaction path and the corresponding Interaction response. You can process the response in the delegate callback. Once processed, pass the response using the
processResponse
method to let the SDK process the response - attaching any capture, track or optimize instructions to the Interaction.See example of usage here.
-
If you no longer need to obtain response for automatically triggered Interaction request, you can either nullify your object or call the SDK’s method
removeInteractionResponseDelegate
as shown below:Swift:
One.removeInteractionResponseDelegate(<your-object>)
Objective-C:
[One removeInteractionResponseDelegate:<your-object>];
Properties can be sent to Thunderhead ONE or Salesforce Interaction Studio as Strings, in the form of key/value pairs using the SDK's public methods, as shown below:
Swift:
let myProperties = ["key1":"value1","key2":"value2"]
Objective-C:
NSDictionary *myProperties = @{@"Key1":@"Value1", @"Key2":@"Value2"};
To send Properties to a base Touchpoint, call the following public method and pass in your dictionary of key/value pair strings:
Swift:
One.sendBaseTouchpointProperties(myProperties)
Objective-C:
[One sendBaseTouchpointProperties:myProperties];
Note:
- This will send a PUT request to Thunderhead ONE or Salesforce Interaction Studio.
- Properties sent to a base Touchpoint will be captured under a base (
/
) or wildcard (/*
) Interaction in Thunderhead ONE or Salesforce Interaction Studio.
To send Properties to a specific Interaction, call the following public method, passing in your dictionary of key/value pair strings and providing the Interaction path:
Swift:
One.sendProperties(myProperties, forInteractionPath:"/InteractionPath")
Objective-C:
[One sendProperties:myProperties forInteractionPath:@"/InteractionPath"];
Note:
- This will send a
PUT
request to Thunderhead ONE or Salesforce Interaction Studio. - When sending Interaction requests programmatically, please ensure the Interaction starts with a
/
and only contains letters, numbers and/or dashes.
You can send an Interaction request with Interaction Properties by calling the method below, passing Interaction path and dictionary of Properties to it:
Swift:
One.sendInteraction("/InteractionPath", withProperties:myProperties)
Objective-C:
[One sendInteraction:@"/InteractionPath" withProperties:myProperties];
Note:
- This will send a
POST
request to Thunderhead ONE or Salesforce Interaction Studio. - Only the tid from the response will be used by the SDK - all other response objects will be ignored.
- When sending Interaction requests programmatically, please ensure the Interaction starts with a
/
and only contains letters, numbers and/or dashes.
You can send an Interaction request with Properties and retrieve its response by calling the method below, passing an Interaction path, a dictionary of Properties and a completion block to it:
Swift:
One.sendInteraction("/InteractionPath", withProperties:myProperties) {
(response, error) in
if (error == nil) {
if let response = response {
One.processResponse(response)
}
}
}
Objective-C:
[One sendInteraction:@"/InteractionPath" withProperties:myProperties andBlock:^(NSDictionary *response, NSError *error) {
if (!error) {
[One processResponse:response];
}
}];
Note:
- This will send a POST request to Thunderhead ONE or Salesforce Interaction Studio.
- When sending Interaction requests programmatically, please ensure the Interaction starts with a
/
and only contains letters, numbers and/or dashes.
The response can be passed to the processResponse
method as a parameter as shown above. This method returns the response to the SDK to process, attaching any capture, track or optimize instructions to the Interaction.
To send a response code, call the method shown below by passing the response code and the corresponding Interaction path as parameters:
Swift:
One.sendResponseCode("yourCode", forInteractionPath:"/InteractionPath")
Objective-C:
[One sendResponseCode:@"yourCode" forInteractionPath:@"/InteractionPath"];
Note:
- This method should be used when displaying Optimizations programmatically and you need to capture the user's response.
- This will send a
PUT
request to Thunderhead ONE or Salesforce Interaction Studio. - When sending Interaction requests programmatically, please ensure the Interaction starts with a
/
and only contains letters, numbers and/or dashes.
To synchronise the Safari Mobile identity set by the ONE Tag, or Interaction Studio Tag, with the current app identity, call:
Swift:
One.identitySync()
Objective-C:
[One identitySync];
Note:
- This functionality only works in iOS 9 and 10.
To synchronise the Safari Mobile identity set by the ONE Tag, or Interaction Studio Tag, with the current app identity and your web Touchpoint, call:
Swift:
One.identitySyncWithURL(URL(string: "https://yourWebsite"))
Objective-C:
[One identitySyncWithURL:[NSURL URLWithString:@"https://yourwebsite"]];
Note:
- This functionality only works in iOS 9 and 10.
The SDK will append a one-tid
url parameter to all links opened from a mobile app. If you would like to limit this behavior, for the SDK to only append a one-tid
to a specific set of links, you can whitelist the links to which the SDK should append a one-tid
by calling the method whitelistIdentityTransferLinks
and passing your links as shown below:
Swift:
// This example shows how to whitelist links under specific domain names
// www.google.com and www.uber.com. For example,
// https://www.google.com, https://www.uber.com/en/,
// https://www.uber.com/en/ride/, etc.
One.whitelistIdentityTransferLinks(["www.google.com","www.uber.com"])
// This example shows how to whitelist the main domain name
// wikipedia.org and any subdomains. For example,
// https://en.wikipedia.org, https://simple.wikipedia.org, etc.
One.whitelistIdentityTransferLinks(["*.wikipedia.org"])
Objective-C:
// This example shows how to whitelist links for specific domain names
// www.google.com and www.uber.com. For example,
// https://www.google.com, https://www.uber.com/en/,
// https://www.uber.com/en/ride/, etc.
[One whitelistIdentityTransferLinks:@[@"www.google.com", @"www.uber.com"]];
// This example shows how to whitelist the main domain name
// wikipedia.org and any subdomain. For example,
// https://en.wikipedia.org, https://simple.wikipedia.org, etc.
[One whitelistIdentityTransferLinks:@[@"*.wikipedia.org"]];
Note:
- When a link is whitelisted, a
one-tid
will be appended to the whitelisted link/s only.
The SDK will append a one-tid
url parameter to all links opened from a mobile app. If you would like to limit this behaviour, for the SDK to only append a one-tid
specific set of links, you can blacklist the links to which the SDK should not append a one-tid
by calling the method blacklistIdentityTransferLinks
and passing your links as shown below:
Swift:
// This example shows how to blacklist links under specific domain names
// www.google.com and www.uber.com. For example,
// https://www.google.com, https://www.uber.com/en/,
// https://www.uber.com/en/ride/, etc.
One.blacklistIdentityTransferLinks(["www.google.com","www.uber.com"])
// This example shows how to blacklist the main domain name
// wikipedia.org and any subdomain. For example,
// https://en.wikipedia.org, https://simple.wikipedia.org, etc.
One.blacklistIdentityTransferLinks(["*.wikipedia.org"])
Objective-C:
// This example shows how to blacklist links under specific domain names
// www.google.com and www.uber.com. For example,
// https://www.google.com, https://www.uber.com/en-BY/,
// https://www.uber.com/en/ride/, etc.
[One blacklistIdentityTransferLinks :@[@"www.google.com", @"www.uber.com"]];
// This example shows how to blacklist the main domain name
// wikipedia.org and any subdomain. For example,
// https://en.wikipedia.org, https://simple.wikipedia.org, etc.
[One blacklistIdentityTransferLinks:@[@"*.wikipedia.org"]];
Note:
- If a link is blacklisted, a
one-tid
will be appended to all other links but the blacklisted link.
By default, the SDK adds one-tid
as a URL query parameter to outgoing network requests. To disable it, call the method disableIdentityTransfer
by passing true
as shown below:
Swift:
One.disableIdentityTransfer(true)
Objective-C:
[One disableIdentityTransfer:YES];
Note:
- This will also disable the ability to automatically pick up parameters from deep links that open the app, whilst also preventing the SDK from adding a
one-tid
as a URL query parameter to web links opened from the app, resulting in the customer's identity not being transferred as they move across channels.
If you have disabled automatic identity transfer you can still send all URL parameters received as part of a URL scheme, which opens your app, by calling:
Swift:
One.handleURL(yourNSURL)
Objective-C:
[One handleURL:yourNSURL];
passing the URL as a parameter into the handleURL SDK public method, as shown below:
Swift:
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
One.handleURL(yourNSURL)
return true
}
Objective-C:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
[One handleURL:url];
return YES;
}
Note:
- This will send a PUT request to Thunderhead ONE or Salesforce Interaction Studio.
If you have disabled automatic identity transfer, you can still add a one-tid
parameter to a link opened from the app programmatically, by calling getURLWithOneTid
as shown below:
Swift:
One.getURLWithOneTid(yourNSURL)
Objective-C:
[One getURLWithOneTid:yourNSURL];
passing the URL as a parameter, which will return back a the same NSURL
containing a one-tid
parameter.
Swift:
let urlWithOneTid = One.getURLWithOneTid(yourNSURL)
Objective-C:
NSURL *urlWithOneTid = [One getURLWithOneTid:yourNSURL];
By default, the SDK will automatically send an Interaction request to /one-click
as a url is opened in Safari, SafariViewController
or WKWebView
to facilitate last click attribution.
To disable this functionality call the disableAutomaticOutboundLinkTracking
method and pass true
, as shown below:
Swift:
One.disableAutomaticOutboundLinkTracking(true)
Objective-C:
[One disableAutomaticOutboundLinkTracking:YES];
If you have disabled automatic outbound link tracking, you can still track a URL, by calling:
Swift:
One.sendInteractionForOutboundLink(yourNSURL)
Objective-C:
[One sendInteractionForOutboundLink:yourNSURL];
passing the URL which will send an Interaction request ‘/one-click’ using the same logic as available automatically.
Note:
- This will send a POST request to Thunderhead ONE or Salesforce Interaction Studio.
To send a location object, call:
Swift:
One.updateLocation(location)
Objective-C:
[One updateLocation:location];
passing the location object as a parameter to the updateLocation
method. Use CLLocationManager
delegate methods to call updateLocation
, as shown below:
Swift:
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
One.updateLocation(locations.first)
}
Objective-C:
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations {
[One updateLocation:[locations firstObject]];
}
Please note this API has been deprecated in version 7.0.0 of the iOS SDK. If you require this API please contact support@thunderhead.com.
To get a structure data, call getStructureData
method by passing a structure’s name and a completion block as shown below:
Swift:
One.getStructureData("yourStructureName") { (response, error) in
if (error == nil) {
// work with response
}
}
Objective-C:
[One getStructureData:@"yourStructureName" withBlock:^(NSDictionary *response, NSError *error) {
if (!error) {
// work with response
}
}];
To get the current tid
used by the SDK, call:
Swift:
One.getTid
Objective-C:
[One getTid];
Note:
- This will return the
tid
assigned to the current user as aNSString
. - Retrieving the current
tid
can be useful if you want to monitor the current user in Thunderhead ONE or Salesforce Interaction Studio. - The tid can also be used if you need to pass the identity of the current user to another system which sends data to Thunderhead ONE or Salesforce Interaction Studio.
To get the current configuration of the SDK, call:
Swift:
let currentConfiguration = OneConfiguration.currentConfiguration()
let siteKey = currentConfiguration?.siteKey
// To access configuration properties, you can also call:
let siteKey = OneConfiguration.shared().siteKey
Objective-C:
OneConfiguration *currentConfiguration = [OneConfiguration currentConfiguration];
NSString *siteKey = currentConfiguration.siteKey;
// To access configuration properties, you can also call:
NSString *siteKey = [OneConfiguration shared].siteKey;
Note:
- Retrieving the current configuration can be useful to validate your setup, especially if you have multiple configurations in an app.
The Thunderhead SDK for iOS provides 5 distinct debugging levels, that can be enabled in the didFinishLaunchingWithOptions
method of your project's AppDelegate, as shown below:
Note: All Thunderhead SDK log messages will be prefixed with [Thunderhead]
in the console.
-
kOneLogLevelNone
- if set, no messages will be displayed in the console.Swift:
One.setLogLevel(.None)
Objective-C:
[One setLogLevel:kOneLogLevelNone];
-
kOneLogLevelAll
- if set, all log messages will be displayed in the console.Swift:
One.setLogLevel(.All)
Objective-C:
[One setLogLevel:kOneLogLevelAll];
-
kOneLogLevelWebService
- if set, only web service logs will be displayed in the console.Swift:
One.setLogLevel(.WebService)
Objective-C:
[One setLogLevel:kOneLogLevelWebService];
-
kOneLogLevelFramework
- if set, only framework logs will be displayed in the console.Swift:
One.setLogLevel(.Framework)
Objective-C:
[One setLogLevel:kOneLogLevelFramework];
-
kOneLogLevelDebug
- if set, only debug logs will be displayed in the console.Swift:
One.setLogLevel(.Debug)
Objective-C:
[One setLogLevel:kOneLogLevelDebug];
Note:
- By default, the Thunderhead SDK for iOS does not display any debug log messages. However, exception messages are printed in the console, when these occur.
You can find out the current version of the framework by calling:
Swift:
One.frameworkVersion()
Objective-C:
[One frameworkVersion];
You can programmatically erase the user profile data by calling:
Swift:
One.clearUserProfile()
Objective-C:
[One clearUserProfile];
Note:
- This method removes
tid
from local storage only. - For instructions on how to completely remove a user's data from Thunderhead ONE or Salesforce Interaction Studio - see our api documentation.