-(void)getSystemInfo{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = (char*)malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [NSString stringWithCString:machine encoding:NSUTF8StringEncoding];
machine = nil;
NSString *strSysName = [[UIDevice currentDevice] systemVersion];
[AppManager setUserDefaultsValue:platform key:@"phoneType"];
[AppManager setUserDefaultsValue:strSysName key:@"phoneSystem"];
[AppManager setUserDefaultsValue:g_versionSNO key:@"version"];
platform = nil;
strSysName = nil;
}
IOS- 得到系统版本
最新推荐文章于 2023-11-13 17:16:34 发布