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

Get notifications about internal SDK actions

Use the MintNotificationDelegate to get notified of internal SDK events.

In Objective-C, add - (void) loggedRequestHandled:(LoggedRequestEventArgs *)args as a callback to get notified after a request has been sent to the Splunt MINT server with information about the action. For example:

// Objective-C

- (void) loggedRequestHandled:(LoggedRequestEventArgs *)args
    NSLog(@"Processed logged client request: %@", args.responseResult.clientRequest);
    NSLog(@"Server response: %@", args.responseResult.serverResponse);

Add - (void) networkDataLogged:(NetworkDataFixture *)networkData to get notified of any REST client calls that Splunk MINT monitored and get any information that was gathered.

// Objective-C

- (void) networkDataLogged:(NetworkDataFixture *)networkData
    NSString* networkDataJSON = [networkData toJSONString];
    NSLog(@"Network Data Logged: %@", networkDataJSON);

Here are the same examples in Swift:

// Swift 

func loggedRequestHandled(args: LoggedRequestEventArgs)
{ println("Processed logged client request: \(args.responseResult.clientRequest)") }

func networkDataLogged(networkData: NetworkDataFixture)
{ println("Network Data Logged: \(networkData.toJSONString())") } 

Add the MintNotificationDelegate to your class interface or private interface and then set the delegate in the Splunk MINT SDK.

// Objective-C
[Mint sharedInstance].notificationDelegate = self;
// Swift
Mint.sharedInstance().notificationDelegate = self

We recommend that you set the notificationDelegate property before initializing the plugin so you don't miss any pending requests that were sent to the server at initialization.

Last modified on 27 February, 2015
Report debugging messages
Integrate WebView monitoring

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