Splunk MINT SDK for iOS (Legacy)

Splunk MINT SDK for iOS Developer Guide

Acrobat logo Download manual as PDF

This documentation does not apply to the most recent version of MintIOSSDK. Click here for the latest version.
Acrobat logo Download topic as PDF

Customize session handling

By default, Splunk MINT uses the initAndStartSession: method and the time zone of our servers to calculate the time a user's session begins. However, you can customize session handling if you need to.

Note When you close a session, it does not impact any other feature of the Splunk MINT plugin. The plugin will continue working properly and record network information, handled exceptions, events, and any crash that might occur.

Use the following methods to start, close, and flush sessions:

  • To explicitly start the session, use the startSessionAsyncWithCompletionBlock: method. (If a previous session was initialized less than one minute earlier, this call is ignored.)
  • To close the active session, use the closeSessionAsyncWithCompletionBlock: method.
  • To manually flush all saved data, use the flushAsyncWithBlock: method.
  • To only send data over a WiFi connection, use the enableFlushOnlyOverWiFi: method.

Example code

If there are logged handled exceptions, custom events, or any network interception captured by Splunk MINT and you don't want to wait for another initAndStartSession use the flushAsyncWithBlock: method to immediately send any logged requests to the Splunk server.

// Objective-C

[[Mint sharedInstance] enableFlushOnlyOverWiFi:YES];

[[Mint sharedInstance] flushAsyncWithBlock:^(MintResponseResult *mintResponseResult)
    if (mintResponseResult.resultState == OKResultState)
        NSLog(@"Flush finished successfully.");
        NSLog(@"Flush finished unsuccessfully.");
// Swift


Mint.sharedInstance().flushAsyncWithBlock { (responseResult) -> Void in
    if (responseResult.resultState.rawValue == OKResultState.rawValue) {
        print("Flush finished successfully.");
    } else {
        print("Flush finished unsuccessfully.");
Last modified on 07 October, 2015
Add Splunk MINT to your iOS project
Monitor transactions

This documentation applies to the following versions of Splunk MINT SDK for iOS (Legacy): 4.1.x, 4.2.x, 4.3.x, 4.4.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