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.

Add and report events

In addition to reporting the sequence of events leading up to an app crash, Splunk MINT can report events that are not associated with a crash. For example, if your application asks users to make a selection, you can report the user's selection. You can also include the log level with the event.

  • To report an event, use the logEventAsyncWithTag:completionBlock: method.

Add as many events as you like to track virtually any user activity on your app. To view the event data, see the Events dashboard in Splunk MINT Management Console.

Example code

// Objective-C

[[Mint sharedInstance] logEventAsyncWithTag:@"Log Custom Event tag" completionBlock:^(MintLogResult *splunkLogResult)
{
    NSString* logResultState = mintLogResult.resultState == OKResultState ? @"OK" : @"Error"
    NSLog(@"Log result: %@", logResultState)
}];
// Swift 

Mint.sharedInstance().logEventAsyncWithTag("Log Event Async With Tag", completionBlock:
{(logResult: MintLogResult!) -> Void in let result = logResult.resultState.value == OKResultState.value ? "OK" : "Failed" println("Log Event Result: \(result)"); }

)
Last modified on 28 August, 2015
Monitor transactions   Dispatch system log messages

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