01.
- (
void
)viewDidLoad
02.
{
03.
[
super
viewDidLoad];
04.
NSString
*udid = [[[
UIDevice
currentDevice] identifierForVendor] UUIDString];
05.
NSString
*DeviceName =[[
UIDevice
currentDevice] name];
06.
NSString
*model =[[
UIDevice
currentDevice] model];
07.
NSString
*systemVersion =[[
UIDevice
currentDevice] systemVersion];
08.
[[
UIDevice
currentDevice] setBatteryMonitoringEnabled:
YES
];
09.
float
batteryLevel = [[
UIDevice
currentDevice] batteryLevel];
10.
11.
12.
NSLog
(@
"UDID is %@"
,udid);
13.
NSLog
(@
"Device Name is %@"
,DeviceName);
14.
NSLog
(@
"Model is %@"
,model);
15.
NSLog
(@
"OS version%@"
,systemVersion);
16.
NSLog
(@
"Battery Level: %f"
,batteryLevel);
17.
18.
}