SKBatteryData Class Reference
| Inherits from | SKSensorData : NSObject | 
|---|---|
| Declared in | SKBatteryData.h | 
– initWithSensorType:withTimestamp:
	Returns an SKSensorData object, initialized with the given SKSensorType and SKSensorTimestamp.
- (instancetype)initWithSensorType:(SKSensorType)sensorType withTimestamp:(SKSensorTimestamp *)timestampParameters
sensorType | 
						The type of the sensor that produced this data object.  | 
					
|---|---|
timestamp | 
						The time were this data log was captured.  | 
					
Return Value
A new SKSensorData object.
Declared In
SKSensorData.h
– initWithLevel:withState:
	Returns an SKBatteryData object, initialized with measurements of the battery level, as well as the battery state.
- (instancetype)initWithLevel:(CGFloat)level withState:(UIDeviceBatteryState)stateParameters
level | 
						A float number that indicates the current battery charge level. Value ranges from 0.0 (fully discharged) to 1.0 (fully charged).  | 
					
|---|---|
state | 
						An enumerator that descrives the state of the battery, classified as Charging, Full, Unplugged or Unknown.  | 
					
Return Value
An SKBatteryData object.
Declared In
SKBatteryData.h
  level
	A float number that indicates the current battery charge level. Value ranges from 0.0 (fully discharged) to 1.0 (fully charged).
@property (nonatomic, readonly) CGFloat levelDeclared In
SKBatteryData.h
  state
	An enumerator that describes the state of the battery, classified as Charging, Full, Unplugged or Unknown.
@property (nonatomic, readonly) UIDeviceBatteryState stateDeclared In
SKBatteryData.h
  stateString
	A string value that describes the state of the battery, classified as Charging, Full, Unplugged or Unknown.
@property (nonatomic, readonly, copy) NSString *stateStringDeclared In
SKBatteryData.h
+ csvHeader
	A string with a CSV formatted header that describes the data of the Battery sensor. This method is useful in combination with the csvString instance method of an SKSensorData object.
+ (NSString *)csvHeaderReturn Value
A string with a CSV header.
Declared In
SKBatteryData.h