Splunk MINT SDK for iOS  4.4
 All Classes Files Functions Enumerations Enumerator Properties Macros
Mint Class Reference

#import <Mint.h>

Inherits NSObject.

Instance Methods

(BOOL) - isInitialized
 
(BOOL) - isSessionActive
 
(void) - disableCrashReporter
 
(void) - flushAsync
 
(void) - initAndStartSession:
 
(void) - initAndStartSessionWithAPIKey:
 
(void) - initAndStartSessionHECWithAPIKey:url:token:
 
(void) - addExtraData:
 
(void) - addExtraDataList:
 
(BOOL) - removeExtraDataWithKey:
 
(void) - clearExtraData
 
(void) - leaveBreadcrumb:
 
(void) - clearBreadcrumbs
 
(void) - logEventAsyncWithTag:
 
(void) - logEventAsyncWithTag:extraDataKey:extraDataValue:
 
(void) - logEventAsyncWithTag:limitedExtraDataList:
 
(void) - startSessionAsync
 
(void) - closeSessionAsync
 
(void) - logExceptionAsync:extraDataKey:extraDataValue:
 
(void) - logExceptionAsync:limitedExtraDataList:
 
(void) - disableNetworkMonitoring
 
(NSDictionary *) - getDevSettings
 
(void) - enableMintLoggingCache:
 
(void) - enableLogging:
 
(void) - enableFlushOnlyOverWiFi:
 
(void) - setLogging:
 
(void) - transactionStart:
 
(void) - transactionStart:extraDataKey:extraDataValue:
 
(void) - transactionStart:limitedExtraDataList:
 
(void) - transactionStop:
 
(void) - transactionStop:extraDataKey:extraDataValue:
 
(void) - transactionStop:limitedExtraDataList:
 
(void) - transactionCancel:reason:
 
(void) - transactionCancel:extraDataKey:extraDataValue:reason:
 
(void) - transactionCancel:limitedExtraDataList:reason:
 
(void) - addURLToBlackList:
 
(NSMutableArray *) - blacklistUrls
 
(void) - logEventAsyncWithName:logLevel:
 
(void) - logEventAsyncWithName:logLevel:extraDataKey:extraDataValue:
 
(void) - logEventAsyncWithName:logLevel:limitedExtraDataList:
 
(NSString *) - exceptionFixtureFrom:
 
(void) - setUserOptOut:
 
(NSString *) - getMintUUID
 
(NSString *) - getSessionID
 
(void) - logViewWithCurrentViewName:limitedExtraDataList:
 
(void) - setSessionInterval:
 
(BOOL) - isHTTPEventCollectorEnabled
 

Class Methods

(Mint *) + sharedInstance
 

Properties

NSString * userIdentifier
 
BOOL handleWhileDebugging
 
LimitedExtraDataListextraDataList
 

Detailed Description

The Mint class is the main class for all appropriate requests. The Mint class.

Method Documentation

- (void) addExtraData: (ExtraData *)  extraData

Adds an ExtraData instance to the global extra data list.

Parameters
extraDataThe ExtraData instance.
- (void) addExtraDataList: (LimitedExtraDataList *)  limitedExtraDataList

Appends a LimitedExtraDataList instance list to the global extra data list.

Parameters
limitedExtraDataListThe LimitedExtraDataList instance.
- (void) addURLToBlackList: (NSString *)  url

Adds a URL to the network monitoring blacklist.

Parameters
urlThe URL to ignore. This can be a partial URL.
- (NSMutableArray*) blacklistUrls

The URLs blacklisted from network monitoring.

Returns
A modifiable array that contains the blacklisted URLs.
- (void) clearBreadcrumbs

Clears the global breadcrumb list.

- (void) clearExtraData

Clears the LimitedExtraDataList instances from the global extra data list.

- (void) closeSessionAsync

Closes a session. All requests and crash reporting will continue to work properly, but the session is no longer logically active.

- (void) disableCrashReporter

Disables crash reporter.

- (void) disableNetworkMonitoring

Disables network monitoring. Call this method before calling initAndStartSession.

- (void) enableFlushOnlyOverWiFi: (BOOL)  enable

Indicates whether to only send data over a WiFi connection.

Parameters
enableYES to send data only over WiFi.
- (void) enableLogging: (BOOL)  enable

Indicates whether to attach device logs to the crash.

Parameters
enableYES to attach device logs.
- (void) enableMintLoggingCache: (BOOL)  enable

Indicates whether to enable logging. When YES, NSLog console messages are cached and sent with the exception.

Parameters
enableIndicates whether to enable logging.
- (NSString*) exceptionFixtureFrom: (NSException *)  exception

Gets an ExceptionDataFixture from an NSException.

Parameters
exceptionThe NSException.
Returns
The ExceptionDataFixture JSON string model.
- (void) flushAsync

Sends all cached requests to the server.

- (NSDictionary*) getDevSettings

Gets the developer's remote settings as key-value pairs.

Returns
A dictionary of key-value pairs.
- (NSString*) getMintUUID

Returns the MINT universally unique identifier (UUID), which uniquely identifies a specific user.

Returns
The UUID of the user.
- (NSString*) getSessionID

Returns the current session ID.

Returns
The session ID.
- (void) initAndStartSession: (NSString *)  DEPRECATED_ATTRIBUTE

Initializes the plugin and starts a session.

Parameters
apiKeyYour Splunk MINT API key.
- (void) initAndStartSessionHECWithAPIKey: (NSString *)  apiKey
url: (NSString *)  url
token: (NSString *)  token 

Initializes the sdk and starts a new session. It validates the URL and sends a ping request. It sends data over HTTP (or HTTPS) directly to Splunk Enterprise

Parameters
apiKeyYour Splunk MINT API key.
urlThe url of the on-premise
tokenThe token of the on-premise
- (void) initAndStartSessionWithAPIKey: (NSString *)  apiKey

Initializes the sdk and starts a new session. It sends a ping request and receives a new remote settings.

Parameters
apiKeyYour Splunk MINT API key.
- (BOOL) isHTTPEventCollectorEnabled

Indicates weather the sdks initialized to send data over HTTP (or HTTPS) directly to Splunk Enterprise

- (BOOL) isInitialized

Indicates whether the plugin is initialized and operating properly.

- (BOOL) isSessionActive

Indicates whether there is an active session. You can close the current session and start a new one as needed.

- (void) leaveBreadcrumb: (NSString *)  crumb

Adds a breadcrumb description to the global breadcrumb list.

Parameters
crumbThe breadcrumb description.
- (void) logEventAsyncWithName: (NSString *)  name
logLevel: (MintLogLevel logLevel 

Logs an event with a log level, sends the log entry to the console window, and caches a request to send to the server.

Parameters
nameThe name of the event (up to 256 characters).
logLevelThe MintLogLevel enumeration value for the log level.
- (void) logEventAsyncWithName: (NSString *)  name
logLevel: (MintLogLevel logLevel
extraDataKey: (NSString *)  key
extraDataValue: (NSString *)  value 

Logs an event with a log level, sends the log entry to the console window, and caches a request to send to the server.

Parameters
nameThe name of the event (up to 256 characters).
logLevelThe MintLogLevel enumeration value for the log level.
keyThe key for the additional extra data to attach to the request.
valueThe value of the additional extra data to attach to the request.
- (void) logEventAsyncWithName: (NSString *)  name
logLevel: (MintLogLevel logLevel
limitedExtraDataList: (LimitedExtraDataList *)  extraDataList 

Logs an event with a log level, sends the log entry to the console window, and caches a request to send to the server.

Parameters
nameThe name of the event (up to 256 characters).
logLevelThe MintLogLevel enumeration value for the log level.
extraDataListA LimitedExtraDataList instance to attach to the request.
- (void) logEventAsyncWithTag: (NSString *)  tag

Logs an event request with a tag description.

Parameters
tagThe tag description.
- (void) logEventAsyncWithTag: (NSString *)  tag
extraDataKey: (NSString *)  key
extraDataValue: (NSString *)  value 

Logs an event request with a tag description.

Parameters
tagThe tag description.
keyThe key for the additional extra data to attach to the request.
valueThe value of the additional extra data to attach to the request.
- (void) logEventAsyncWithTag: (NSString *)  tag
limitedExtraDataList: (LimitedExtraDataList *)  extraDataList 

Logs an event request with a tag description.

Parameters
tagThe tag description.
extraDataListA LimitedExtraDataList instance to attach to the request.
- (void) logExceptionAsync: (NSException *)  exception
extraDataKey: (NSString *)  key
extraDataValue: (NSString *)  value 

Logs a handled exception in your try/catch block.

Parameters
exceptionThe NSException instance.
keyThe key for the additional extra data to attach to the request.
valueThe value of the additional extra data to attach to the request.
- (void) logExceptionAsync: (NSException *)  exception
limitedExtraDataList: (LimitedExtraDataList *)  extraDataList 

Logs a handled exception in your try/catch block.

Parameters
exceptionThe NSException instance.
limitedExtraDataListA LimitedExtraDataList instance to attach to the request.
- (void) logViewWithCurrentViewName: (NSString *)  currentViewName
limitedExtraDataList: (LimitedExtraDataList *)  extraDataList 

Logs a specific view as a Splunk data type.

Parameters
currentViewNameThe name of the current view.
extraDataListA LimitedExtraDataList instance to attach to the request.
- (BOOL) removeExtraDataWithKey: (NSString *)  key

Removes an ExtraData instance from the global extra data list.

Parameters
keyThe key of the ExtraData instance.
Returns
A Boolean that indicates whether the instance was removed successfully. If NO, an ExtraData instance with the specified key does not exist.
- (void) setLogging: (NSInteger)  linesCount

Sets the maximum number of lines to cache from the console log.

Parameters
linesCountThe number of lines.
- (void) setSessionInterval: (NSInteger)  intervalInSeconds

Configure session interval

Parameters
intervalInSecondstime interval for session
- (void) setUserOptOut: (BOOL)  setUserOptOut

Indicates whether to prevent MINT from saving or sending any data for the user.

Parameters
setUserOptOutYES to prevent MINT from saving or sending any data.
+ (Mint*) sharedInstance

Returns the singleton Mint reference to use in your application. You should not initialize the Mint class yourself because unexpected results may occur.

Returns
The Mint singleton instance reference.
- (void) startSessionAsync

Starts a new session. If a previous session was initialized less than one minute earlier, this call is ignored.

- (void) transactionCancel: (NSString *)  transactionName
extraDataKey: (NSString *)  key
extraDataValue: (NSString *)  value
reason: (NSString *)  aReason 

Cancels a transaction.

Parameters
transactionNameThe name of the transaction.
keyThe key for the additional extra data to attach to the request.
valueThe value of the additional extra data to attach to the request.
aReasonThe reason for cancelling the transaction.
- (void) transactionCancel: (NSString *)  transactionName
limitedExtraDataList: (LimitedExtraDataList *)  extraDataList
reason: (NSString *)  aReason 

Cancels a transaction.

Parameters
transactionNameThe name of the transaction.
extraDataListA LimitedExtraDataList instance to attach to the request.
aReasonThe reason for cancelling the transaction.
- (void) transactionCancel: (NSString *)  transactionName
reason: (NSString *)  aReason 

Cancels a transaction.

Parameters
transactionNameThe name of the transaction.
aReasonThe reason for cancelling the transaction.
- (void) transactionStart: (NSString *)  transactionName

Starts a transaction with a unique name.

Parameters
transactionNameThe unique transaction name.
- (void) transactionStart: (NSString *)  transactionName
extraDataKey: (NSString *)  key
extraDataValue: (NSString *)  value 

Starts a transaction with a unique name.

Parameters
transactionNameThe unique transaction name.
keyThe key for the additional extra data to attach to the request.
valueThe value of the additional extra data to attach to the request.
- (void) transactionStart: (NSString *)  transactionName
limitedExtraDataList: (LimitedExtraDataList *)  extraDataList 

Starts a transaction with a unique name.

Parameters
transactionNameThe unique transaction name.
extraDataListA LimitedExtraDataList instance to attach to the request.
- (void) transactionStop: (NSString *)  transactionName

Stops a transaction.

Parameters
transactionNameThe name of the transaction.
- (void) transactionStop: (NSString *)  transactionName
extraDataKey: (NSString *)  key
extraDataValue: (NSString *)  value 

Stops a transaction.

Parameters
transactionNameThe name of the transaction.
keyThe key for the additional extra data to attach to the request.
valueThe value of the additional extra data to attach to the request.
- (void) transactionStop: (NSString *)  transactionName
limitedExtraDataList: (LimitedExtraDataList *)  extraDataList 

Stops a transaction.

Parameters
transactionNameThe name of the transaction.
extraDataListA LimitedExtraDataList instance to attach to the request.

Property Documentation

- (LimitedExtraDataList*) extraDataList
readwritenonatomicstrong

A LimitedExtraDataList instance where you can set global extra data (ExtraData instances) and attach them to the handled exception requests.

- (BOOL) handleWhileDebugging
readwritenonatomicassign

A value that is set internally and used only by the SDK plugin. Set this value to NO when you don't want requests to be logged and sent to the server. The default value is YES.

- (NSString*) userIdentifier
readwritenonatomicstrong

Sets a user identifier such as a random ID, an email address, or a username for the current user.


The documentation for this class was generated from the following file: