OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #import "SystemInfo.h" | |
Mark Mentovai
2016/07/11 17:56:17
Blank after me too.
| |
6 #include <mach-o/arch.h> | |
7 | |
8 @implementation SystemInfo | |
9 | |
10 + (NSString*)getArch { | |
11 const NXArchInfo* arch = NXGetLocalArchInfo(); | |
12 NSString* archName = [NSString stringWithUTF8String:arch->name]; | |
13 return archName; | |
14 } | |
15 | |
16 + (NSString*)getOSVersion { | |
17 // NSOperatingSystemVersion osVersion = [[NSProcessInfo processInfo] | |
Elly Fong-Jones
2016/07/11 16:15:48
This commented-out code doesn't need to be here.
| |
18 // operatingSystemVersion]; | |
19 // NSString* versionNumber = [NSString stringWithFormat:@"%ld.%ld.%ld", | |
20 // osVersion.majorVersion, | |
21 // osVersion.minorVersion, | |
22 // osVersion.patchVersion]; | |
23 NSDictionary* systemVersion = | |
24 [NSDictionary dictionaryWithContentsOfFile: | |
25 @"/System/Library/CoreServices/SystemVersion.plist"]; | |
26 NSString* versionNumber = [systemVersion objectForKey:@"ProductVersion"]; | |
27 | |
28 return versionNumber; | |
29 } | |
30 | |
31 @end | |
OLD | NEW |