当前位置:首页 > 操作系统 > Ios

IOS- 得到系统版本

            -(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;
}
        

原文:http://blog.csdn.net/u010742414/article/details/47108521


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!