Splunk MINT SDK for iOS

Splunk MINT SDK for iOS Developer Guide

Download manual as PDF

Download topic as PDF

Monitor the battery level of devices

Enable the iOS framework to report the battery level of devices that use your app to the iOS SDK. When you enable battery level monitoring, every event from a device will include the battery level of the device.

For best results, start reporting the battery level of devices before you initialize the SDK.

Battery level values range from 0 to 100. A value of -1 means that battery level reporting is disabled in the iOS framework.

Enable battery level monitoring

Add this code to enable battery level monitoring:

UIDevice.current.isBatteryMonitoringEnabled = true
Last modified on 05 November, 2019
Integrate WebView monitoring
Objective-C code example

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