TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
UCKDeviceInfo
gets device information.
For example, the application name and remaining battery power.
Add classes
folder to your project.
UCKDeviceDataManager *deviceDataManager = [[UCKDeviceDataManager alloc] init];
UCKDeviceData *deviceData = deviceDataManager.deviceData;
UCKApplicationData *applicationData = deviceData.applicationData;
UCKBatteryData *batteryData = deviceData.batteryData;
UCKNetworkData *networkData = deviceData.networkData;
UCKSystemData *systemData = deviceData.systemData;
NSMutableString *messageString = [NSMutableString stringWithCapacity:0];
[messageString appendFormat:@"Application name:%@\n", applicationData.applicationName];
[messageString appendFormat:@"Application version:%@\n", applicationData.applicationVersionName];
[messageString appendFormat:@"OS Version:%@\n", systemData.osVersion];
[messageString appendFormat:@"Platform:%@\n", systemData.platform];
[messageString appendFormat:@"Model:%@\n", systemData.model];
[messageString appendFormat:@"Brand:%@\n", systemData.brand];
[messageString appendFormat:@"Free memory:%ld(MB)\n", systemData.freeSpace];
[messageString appendFormat:@"Total memory:%ld(MB)\n", systemData.totalSpace];
[messageString appendFormat:@"Battery level:%d\n", batteryData.level];
[messageString appendFormat:@"Battery status:%@\n", batteryData.statusName];
[messageString appendFormat:@"Network type:%@\n", networkData.networkTypeName];
UIAlertView *alert = [[UIAlertView alloc] init];
alert.title = @"Device info";
alert.message = messageString;
[alert addButtonWithTitle:@"Close"];
[alert show];
UCKDeviceInfo © 2014 Keisuke Uchida (http://uchidak.net) All rights reserved.
MIT License.
This software uses the open source software listed below.
Reachability © Apple Inc. All rights reserved.
© 2013 Keisuke Uchida All rights reserved.