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

Add Splunk MINT to your iOS project

To use the SDK:

  1. Include the SplunkMint library umbrella header or module in every file where you use Splunk MINT.
  2. Import header:

    #import <SplunkMint/SplunkMint.h>

    Import module:

     @import SplunkMint;
  3. If you are using swift, Include the SplunkMint module in every file where you use Splunk MINT.
  4. Import module:

     @import SplunkMint;
  5. Initialize SplunkMint with one line of code with your API key, preferably in the beginning of your application delegates application:didFinishLaunchingWithOptions:
  6. // Objective-C
    - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        [[Mint sharedInstance] initAndStartSession:@"API_KEY"];
        // ...
    // Swift 
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
    { Mint.sharedInstance().initAndStartSession("API_KEY") return true } 

The initAndStartSession: method installs the Splunk exception handler and the performance monitor, sends all the saved data and performance metrics to Splunk MINT, and starts a new session for your activity.

  • To have a better experience with the Splunk MINT dashboards, use numeric versioning schemes, preferably in MAJOR.MINOR.RELEASE format.
  • Do not use any other SDKs that perform error reporting with MINT. Conflicts might occur when multiple SDKs are active.

A variable for the crash controller is not required. The sharedInstance static class selector returns the singleton instance reference. You can also set this value to a property, which is recommended when you use the Mint class a lot in any file.

If you crash the app while debugging, the crash will not be reported. To report crashes, you must deploy the app to your device or simulator and then start it outside the debugging environment.

Last modified on 18 May, 2015
Configure your project for symbolication
Customize session handling

This documentation applies to the following versions of Splunk MINT SDK for iOS (Legacy): 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