Integrate WebView monitoring
WebView monitoring allows the MINT SDKs to access hybrid (non-native) web pages and gain visibility into their functions. Use MintUIWebView and MintWKWebView to integrate WebView monitoring into your mobile app to work with hybrid pages.
Create MintUIWebView
Use one of the following ways to create an instance of MintUIWebView.
// Initialize WebView programmatically MintUIWebView *webView = [[MintUIWebView alloc] init];
or
// Initialize WebView from Interface Builder // To do: Go to the identity inspector and change the class from UIWebView to MintUIWebView // Enable Hybrid [webView setDelegate:self];
Create MintWKWebView
Use the following control to create an instance of MintWKWebView.
// Initialize WebView WKWebViewConfiguration *webConfig = [[WKWebViewConfiguration alloc]init]; MintWKWebView *webView = [[MintWKWebView alloc] initWithFrame:self.view.frame configuration:webConfig]; // Enable Hybrid webView.navigationDelegate = self;
Use hybrid API calls
mintBridge.initAndStartSession('apiKey') mintBridge.startSession() mintBridge.closeSession() mintBridge.flush() mintBridge.addExtraData('key', 'value') mintBridge.clearExtraData() mintBridge.leaveBreadcrumb('breadcrumb1') mintBridge.logEvent('event name', {'key': 'value'}) mintBridge.logView('view name', {'key': 'value'} ) mintBridge.setLocation('myLatitude', 'myLongitude', 'myLocationTimestamp') mintBridge.setUserIdentifier('username') mintBridge.transactionCancel('transaction id', 'reason for cancel', {'key': 'value'}) mintBridge.transactionStart('transaction name', {'key': 'value'}) mintBridge.transactionStop('transaction id', {'key': 'value'})
To retrieve a transaction ID, use the following callback function:
function transactionStarted(transactionID) { }
Report debugging messages | Monitor the battery level of devices |
This documentation applies to the following versions of Splunk MINT™ SDK for iOS (Legacy): 5.2.x
Feedback submitted, thanks!