Mac获取系统版本
作者:互联网
// 获取系统版本
NSString *versionString;
NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
versionString = [sv objectForKey:@"ProductVersion"];
NSLog(@"%@", versionString);
NSString* major = @"";
NSString* minjor = @"";
NSArray* majminor = [versionString componentsSeparatedByString:@"."];
LOG_INFO("Verify_CORE_ML 26.3");
major = [majminor objectAtIndex:0];
LOG_INFO("Verify_CORE_ML 26.4");
minjor = [majminor objectAtIndex:1];
标签:versionString,major,LOG,majminor,NSString,sv,获取,Mac,版本 来源: https://blog.csdn.net/YoungHong1992/article/details/122686079