Splunk MINT SDK for iOS (Legacy)

Splunk MINT SDK for iOS Developer Guide

Acrobat logo Download manual as PDF


Splunk MINT is no longer available for purchase as of January 29, 2021. Customers who have already been paying to ingest and process MINT data in Splunk Enterprise will continue to receive support until December 31, 2021, which is End of Life for all MINT products: App, Web Service (Management Console), SDK and Add-On.
This documentation does not apply to the most recent version of Splunk MINT SDK for iOS (Legacy). For documentation on the most recent version, go to the latest release.
Acrobat logo Download topic as PDF

Integrate WebView monitoring

WebView monitoring allows the MINT SDKs to access hybrid (non-native) web pages and gain visibility into their functions. Use MintUIWebView and MintWKWebView to integrate WebView monitoring into your mobile app to work with hybrid pages.

Create MintUIWebView

Use one of the following ways to create an instance of MintUIWebView.

// Initialize WebView programmatically
MintUIWebView *webView = [[MintUIWebView alloc] init];

or

// Initialize WebView from Interface Builder
// To do: Go to the identity inspector and change the class from UIWebView to MintUIWebView

// Enable Hybrid
[webView setDelegate:self];

Create MintWKWebView

Use the following control to create an instance of MintWKWebView.

// Initialize WebView
WKWebViewConfiguration *webConfig = [[WKWebViewConfiguration alloc]init];
MintWKWebView *webView = [[MintWKWebView alloc] initWithFrame:self.view.frame configuration:webConfig];

// Enable Hybrid
webView.navigationDelegate = self;

Use hybrid API calls

Mint.initAndStartSession('apiKey')
Mint.logEvent('event name', {'key': 'value'})
Mint.logView('view name', {'key': 'value'} )
Mint.leaveBreadcrumb('breadcrumb1')
Mint.transactionStart('transaction name', {'key': 'value'})
Mint.transactionStop('transaction id', {'key': 'value'})
Mint.transactionCancel('transaction id', 'reason for cancel', {'key': 'value'})
Mint.addExtraData('key', 'value')
Mint.clearExtraData()
Mint.flush()
Mint.startSession()
Mint.closeSession()
Mint.setUserIdentifier('username')

To retrieve a transaction ID, use the following callback function:

function transactionStarted(transactionID) {
}
Last modified on 21 June, 2016
PREVIOUS
Report debugging messages
  NEXT
Objective-C code example

This documentation applies to the following versions of Splunk MINT SDK for iOS (Legacy): 5.1.x


Was this documentation topic helpful?


You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters