#import <Mint.h>
Inherits NSObject.
The Mint class is the main class for all appropriate requests. The Mint class.
Adds extra data to the global extra data collection as a dictionary.
- Parameters
-
- (void) addExtraData: |
|
(NSString *) |
value |
forKey: |
|
(NSString *) |
key |
|
|
| |
Adds extra data to the global extra data collection as a key-value pair.
- Parameters
-
value | The extra data value. |
key | The extra data key. |
- (void) addURLToBlackList: |
|
(NSString *) |
url |
|
Adds a URL to the network monitoring blacklist.
- Parameters
-
url | The 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.
Closes the session. All requests and crash reporting will continue to work properly, but the session is no longer logically active.
- (void) disableCrashReporter |
|
|
|
Disables the crash reporter.
- (void) disableNetworkMonitoring |
|
|
|
Disables network monitoring. Call this method before calling initAndStartSessionWithAPIKey or initAndStartSessionWithHECUrl.
- (void) enableDebugLog: |
|
(BOOL) |
enable |
|
Indicates whether additional logging output should be generated from the SDK. The default is NO.
- Parameters
-
enable | YES to generate additional logging. |
- (void) enableFlushOnlyOverWiFi: |
|
(BOOL) |
enable |
|
Indicates whether to only send data over a WiFi connection.
- Parameters
-
enable | YES to send data only over WiFi. |
- (void) enableLogging: |
|
(BOOL) |
enable |
|
Indicates whether to attach device logs to the crash.
- Parameters
-
enable | YES 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
-
enable | YES to enable logging. |
- (void) enableUserOptOut: |
|
(BOOL) |
userOptOut |
|
Indicates whether to prevent MINT from saving or sending any data for the user.
- Parameters
-
userOptOut | YES to prevent MINT from saving or sending any data. |
- (NSDictionary*) extraData |
|
|
|
Gets the global extra data collection.
- (NSString*) extraDataForKey: |
|
(NSString *) |
key |
|
Gets the extra data that corresponds to a given key.
- Parameters
-
- Returns
- The value.
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) initAndStartSessionWithAPIKey: |
|
(NSString *) |
apiKey |
|
Initializes the SDK and starts a new session for the MINT Data Collector environment. This method sends a ping request and receives remote settings.
- Parameters
-
apiKey | The Splunk MINT API key for the mobile app. |
- (void) initAndStartSessionWithHECUrl: |
|
(NSString *) |
url |
token: |
|
(NSString *) |
token |
|
|
| |
Initializes the SDK and starts a new session the HTTP Event Collector (HEC) environment to send data over HTTP or HTTPS directly to Splunk Enterprise. This method validates the URL and sends a ping request.
- Parameters
-
url | The URL of the HEC MINT endpoint. |
token | The HEC input token. |
- (BOOL) isHTTPEventCollectorEnabled |
|
|
|
Indicates whether the SDK has been initialized to send data over HTTP (or HTTPS) directly to Splunk Enterprise using the HTTP Event Collector.
Indicates whether the plugin is initialized and operating properly.
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
-
crumb | The breadcrumb description. |
- (void) logEventWithName: |
|
(NSString *) |
name |
|
Logs an event.
- Parameters
-
name | The name of the event (up to 256 characters). |
Logs an event with a log level.
- Parameters
-
name | The name of the event (up to 256 characters). |
logLevel | The MintLogLevel enumeration value for the log level. |
Logs an event with a log level and attaches extra data to the request.
- Parameters
-
name | The name of the event (up to 256 characters). |
logLevel | The MintLogLevel enumeration value for the log level. |
extraDataDictionary | A MintLimitedExtraData instance containing extra data. |
- (void) logEventWithName: |
|
(NSString *) |
name |
logLevel: |
|
(MintLogLevel) |
logLevel |
extraDataKey: |
|
(NSString *) |
key |
extraDataValue: |
|
(NSString *) |
value |
|
|
| |
Logs an event with a log level and attaches extra data to the request.
- Parameters
-
name | The name of the event (up to 256 characters). |
logLevel | The MintLogLevel enumeration value for the log level. |
key | The key for the additional extra data. |
value | The value of the additional extra data. |
- (void) logException: |
|
(NSException *) |
exception |
|
Logs a handled exception in your try/catch
block.
- Parameters
-
exception | The NSException instance. |
Logs a handled exception in your try/catch
block and attaches extra data to the request.
- Parameters
-
exception | The NSException instance. |
extraDataDictionary | A MintLimitedExtraData instance containing extra data. |
- (void) logException: |
|
(NSException *) |
exception |
extraDataKey: |
|
(NSString *) |
key |
extraDataValue: |
|
(NSString *) |
value |
|
|
| |
Logs a handled exception in your try/catch
block and attaches extra data to the request.
- Parameters
-
exception | The NSException instance. |
key | The key for the extra data. |
value | The value of the extra data. |
- (void) logMemoryWarningWithClassName: |
|
(NSString *) |
className |
|
Used internally by the SDK to log memory information when memory warnings are received.
- Parameters
-
className | The name of the class that received a memory warning. |
- (void) logMethodTrace: |
|
(NSDictionary *) |
traceInfo |
|
Used internally by the SDK to log trace information for methods.
- Parameters
-
traceInfo | The trace information. |
- (void) logViewWithCurrentViewName: |
|
(NSString *) |
currentViewName |
|
Logs a specific view as a Splunk data type.
- Parameters
-
currentViewName | The name of the current view. |
Logs a specific view as a Splunk data type and attaches extra data to the request.
- Parameters
-
currentViewName | The name of the current view. |
extraDataDictionary | A MintLimitedExtraData instance containing extra data. |
Logs a specific view as a Splunk data type and attaches extra data to the request.
- Parameters
-
currentViewName | The name of the current view. |
key | The key for the extra data. |
value | The value of the extra data. |
- (void) MintLog |
|
(MintLogLevel) |
logLevel |
|
|
(NSString *) |
message |
|
|
|
... |
|
|
| |
Sends the log entry to the console window, and caches a request to send to the server.
- Parameters
-
logLevel | The MintLogLevel enumeration value for the log level. |
message | The message for the log level. |
- (void) removeAllExtraData |
|
|
|
Clears the global extra data collection.
- (void) removeExtraDataForKey: |
|
(NSString *) |
key |
|
Remove an entry from the global extra data collection for a given key.
- Parameters
-
key | The key of the extra data entry. |
- (void) setLogging: |
|
(NSInteger) |
linesCount |
|
Sets the maximum number of lines to cache from the console log.
- Parameters
-
linesCount | The number of lines. |
- (void) setSessionInterval: |
|
(NSInteger) |
intervalInSeconds |
|
Configures the session interval.
- Parameters
-
intervalInSeconds | The time interval for the session, in seconds. |
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.
Starts a new session. If a previous session was initialized less than one minute earlier, this call is ignored.
- (NSString*) startTimerWithName: |
|
(NSString *) |
timerName |
|
Starts a timer.
- Parameters
-
timerName | The name of the timer. |
- Returns
- The timer ID.
- (void) stopTimerWithId: |
|
(NSString *) |
timerId |
|
Stops a timer.
- Parameters
-
- (void) transactionCancel: |
|
(NSString *) |
transactionID |
reason: |
|
(NSString *) |
aReason |
|
|
| |
Cancels a transaction.
- Parameters
-
transactionID | The ID of the transaction. |
aReason | The reason for cancelling the transaction. |
- (void) transactionCancel: |
|
(NSString *) |
transactionID |
reason: |
|
(NSString *) |
aReason |
extraData: |
|
(MintLimitedExtraData *) |
extraDataDictionary |
|
|
| |
Cancels a transaction and attaches extra data to the request.
- Parameters
-
transactionID | The ID of the transaction. |
aReason | The reason for cancelling the transaction. |
extraDataDictionary | A MintLimitedExtraData instance containing extra data. |
- (void) transactionCancel: |
|
(NSString *) |
transactionID |
reason: |
|
(NSString *) |
aReason |
extraDataKey: |
|
(NSString *) |
key |
extraDataValue: |
|
(NSString *) |
value |
|
|
| |
Cancels a transaction and attaches extra data to the request.
- Parameters
-
transactionID | The ID of the transaction. |
aReason | The reason for cancelling the transaction. |
key | The key for the additional extra data. |
value | The value of the additional extra data. |
- (NSString*) transactionStart: |
|
(NSString *) |
transactionName |
|
Starts a named transaction.
- Parameters
-
transactionName | The transaction name. |
- Returns
- The transaction ID
Starts a named transaction and attaches extra data to the request.
- Parameters
-
transactionName | The transaction name. |
extraDataDictionary | A MintLimitedExtraData instance containing extra data. |
- Returns
- The transaction ID
- (NSString*) transactionStart: |
|
(NSString *) |
transactionName |
extraDataKey: |
|
(NSString *) |
key |
extraDataValue: |
|
(NSString *) |
value |
|
|
| |
Starts a named transaction and attaches extra data to the request.
- Parameters
-
transactionName | The transaction name. |
key | The key for the extra data. |
value | The value of the extra data. |
- Returns
- The transaction ID
- (void) transactionStop: |
|
(NSString *) |
transactionID |
|
Stops a transaction.
- Parameters
-
transactionID | The ID of the transaction. |
Stops a transaction and attaches extra data to the request.
- Parameters
-
transactionID | The ID of the transaction. |
extraDataDictionary | A MintLimitedExtraData instance containing extra data. |
- (void) transactionStop: |
|
(NSString *) |
transactionID |
extraDataKey: |
|
(NSString *) |
key |
extraDataValue: |
|
(NSString *) |
value |
|
|
| |
Stops a transaction and attaches extra data to the request.
- Parameters
-
transactionID | The ID of the transaction. |
key | The key for the extra data. |
value | The value of the extra data. |
- (NSString*) applicationEnvironment |
|
readwritenonatomicstrong |
Sets an application environment. Use a custom string or one of the predefined enviroment constants:
-
SPLAppEnvRelease
-
SPLAppEnvStaging
-
SPLAppEnvUserAcceptanceTesting
-
SPLAppEnvTesting
-
SPLAppEnvDevelopment
If not explicitly set, the default is SPLAppEnvRelease.
- (NSString*) userIdentifier |
|
readwritenonatomicstrong |
A user identifier for the current user, such as a random ID, an email address, or a username.
The documentation for this class was generated from the following file: