Splunk MINT SDK for iOS

Splunk MINT SDK for iOS Developer Guide

Download manual as PDF

Download topic as PDF

Track views

In an iOS application, Splunk MINT automatically tracks the views a user accesses. As soon as a user initializes your app, Splunk MINT captures the render time of a view, the current and previous view of a user (relative to an error), and the time a user spends on a view.

Splunk MINT does not automatically track alert views. To track alert views, configure the log view manually. Use the logViewWithCurrentViewName method to manually report view transitions. When you manually report view transitions, disable automatic view tracking with the disableViewMonitoring method before initializing the iOS SDK. If you manually report view transitions and do not disable automatic view tracking, you may create duplicate view transitions that will make it difficult to accurately track views.

To use a different view name than the one that is automatically generated, override the mintViewName string in /mint-ios-sdk/SplunkMint/SplunkMint/ScreenMonitor/UIViewController+Delegates.m. For example:

- (NSString*)mintViewName {
    return @"Custom class name"; 
}

For more information, see the Splunk MINT SDK for iOS API Reference.

Examples

//Objective C

    [[Mint sharedInstance] logViewWithCurrentViewName:@"TestView"];

    [[Mint sharedInstance] logViewWithCurrentViewName:@"TestView" extraDataKey:@"Key" extraDataValue:@"Value"];

    MintLimitedExtraData* extraData = [[MintLimitedExtraData alloc] init];
    [extraData setValue:@"value" forKey:@"key"];
    [[Mint sharedInstance] logViewWithCurrentViewName:@"TestView" extraData:extraData];

//Swift

    Mint.sharedInstance().logViewWithCurrentViewName("TestView")

    Mint.sharedInstance().logViewWithCurrentViewName("TestView", extraDataKey: "Key", extraDataValue: "value")

    let limitedExtraData = MintLimitedExtraData()
    limitedExtraData.setValue("value", forKey: "key")
    Mint.sharedInstance().logViewWithCurrentViewName("TestView", extraData: limitedExtraData)

Manually report view transitions

Use the logViewWithCurrentViewName method to manually report view transitions. When you manually report view transitions, disable automatic view tracking with the disableViewMonitoring method before initializing the iOS SDK. If you manually report view transitions and do not disable automatic view tracking, you may create duplicate view transitions that will make it difficult to accurately track views.

For more information, see the Splunk MINT SDK for iOS API Reference.

PREVIOUS
Add breadcrumbs to crash reports
  NEXT
Create timers

This documentation applies to the following versions of Splunk MINT SDK for iOS: 5.2.x


Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

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