Splunk MINT SDK for iOS (Legacy)

Splunk MINT SDK for iOS Developer Guide

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.

Migration guide for iOS

As you may have noticed, BugSense recently became Splunk MINT.

Apart from the rebranding, we improved some of the old features and we added many more really interesting ones. If you have already integrated BugSense into your application, it shouldn't take more than five minutes to migrate to the new Splunk MINT SDK.

This migration guide will help you migrate your iOS project from BugSense to Splunk MINT.

Basic changes

  • The header is changed from <BugSense-iOS/BugSenseController.h> to <SplunkMint-iOS/SplunkMint-iOS.h>.
  • The main class changed from BugSenseController to Mint.

New features

  • Transactions
  • Advanced events
  • Network monitoring

Documentation

The documentation has been updated and there is now a separate API reference:

API changes for migrating

Change the import statement:

// Old:
#import <BugSense-iOS/BugSenseController.h>

// New:
#import <SplunkMint-iOS/SplunkMInt-iOS.h>

Update the class name. The BugSenseController was a static class with static methods. Mint no longer offers static methods. Instead, access the Singleton [Mint sharedInstance] to get the reference:

// Old:
BugSenseController

// New:
[Mint sharedInstance]

Update the methods. Here's a comparison of old and new to show you how they changed.

  • initAndStartSession:
  • // Old:
    [BugSenseController sharedControllerWithBugSenseAPIKey:@"APIKEY"];
    
    // New:
    [[Mint sharedInstance] initAndStartSession:@”APIKEY”];
  • startSession, closeSession, and flush:
  • // Old:
    -
    
    // New:
    [[Mint sharedInstance] startSessionAsyncWithCompletionBlock:nil];
    
    // Old:
    -
    
    // New:
    [[Mint sharedInstance] closeSessionAsyncWithCompletionBlock:nil];
    
    // Old:
    -
    
    // New:
    [[Mint sharedInstance] flushAsyncWithBlock:nil];
  • addExtraData:
  • // Old:
    [BugSenseController sharedControllerWithBugSenseAPIKey:@"APIKEY" userDictionary:@{ @"key1": @"value1" }];
    
    
    // New:
    [[Mint sharedInstance] addExtraData:[[ExtraData alloc] initWithKey:@"Global Extra Key1" andValue:@"Global Extra Value1"]];
    
  • removeExtraData and clearExtraData:
  • // Old:
    -
    
    // New:
    [[Mint sharedInstance] removeExtraDataWithKey:@"Key"];
    
    // Old:
    -
    
    // New:
    [[Mint sharedInstance] clearExtraData];
  • setUserIdentifier:
  • // Old:
    [BugSenseController setUserIdentifier:@"username"];
    
    // New:
    [Mint sharedInstance].userIdentifier = @"username";
    
  • logException, BUGSENSE_LOG:
  • // Old:
    [BugSenseController logException:exception withExtraData:nil];
    
    // New:
    [[Mint sharedInstance] logExceptionAsync:exception limitedExtraDataList:nil completionBlock:nil];
    
    // Old:
    BUGSENSE_LOG(exception, nil);
    
    // New:
    MintLogException(exception, nil);
  • leaveBreadcrumb:
  • // Old:
    [BugSenseController leaveBreadcrumb:@"breadcrumb"];
    
    // New:
    [[Mint sharedInstance] leaveBreadcrumb:@"breadcrumb"];
  • setLogMessagesLeveland setLogMessagesCount:
  • // Old:
    [BugSenseController setLogMessagesLevel:1]; 
    [BugSenseController setLogMessagesCount:8];
    
    
    // New:
    [[Mint sharedInstance] setLogging:1];
  • sendCustomEventWithTag:
  • // Old:
    [BugSenseController sendCustomEventWithTag:@"eventTag"];
    
    
    // New:
    [[Mint sharedInstance] logEventAsyncWithTag:@"Log Custom Event tag" completionBlock:nil];
    [[Mint sharedInstance] logEventAsyncWithName:@"Test Log Event" logLevel:DebugLogLevel andCompletionBlock:nil];
Last modified on 02 March, 2015
MINT documentation   Requirements and installation for iOS

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


Was this topic useful?







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