NimbusKit
1.2.1 - Fork Nimbus on Github - Visit the Nimbus Wiki
The iOS framework that grows only as fast as its documentation
|
An interface for accessing device information.
This class is not meant to be instantiated. All methods are class implementations.
This class aims to simplify the interface for collecting device information. The low-level mach APIs provide a host of valuable information but it's often in formats that aren't particularly ready for presentation.
Tasks | |
Memory | |
(unsigned long long) | + bytesOfFreeMemory |
(unsigned long long) | + bytesOfTotalMemory |
(void) | + simulateLowMemoryWarning |
Disk Space | |
(unsigned long long) | + bytesOfFreeDiskSpace |
(unsigned long long) | + bytesOfTotalDiskSpace |
Battery | |
(CGFloat) | + batteryLevel |
(UIDeviceBatteryState) | + batteryState |
Caching | |
(BOOL) | + beginCachedDeviceInfo |
(void) | + endCachedDeviceInfo |
The number of bytes in memory that are free.
Calculated using the number of free pages of memory.
The total number of bytes of memory.
Calculated by adding together the number of free, wired, active, and inactive pages of memory.
This value may change over time on the device due to the way iOS partitions available memory for applications.
Simulate low memory warning.
Don't use this in production because it uses private API
The number of bytes free on disk.
The total number of bytes of disk space.
The battery charge level in the range 0 .
. 1.0. -1.0 if UIDeviceBatteryStateUnknown.
This is a thin wrapper for [[UIDevice currentDevice] batteryLevel].
The current battery state.
This is a thin wrapper for [[UIDevice currentDevice] batteryState].
Fetches the device's current information and then caches it.
All subsequent calls to NIDeviceInfo methods will use this cached information.
This can be a useful way to freeze the device info at a moment in time.
Example:
Stop using the cache for the device info methods.