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" |
| 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 |
| 18 // NSOperatingSystemVersion osVersion = [[NSProcessInfo processInfo] |
| 19 // operatingSystemVersion]; |
| 20 // NSString* versionNumber = [NSString stringWithFormat:@"%ld.%ld.%ld", |
| 21 // osVersion.majorVersion, |
| 22 // osVersion.minorVersion, |
| 23 // osVersion.patchVersion]; |
| 24 NSString *versionNumber; |
| 25 NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile: |
| 26 @"/System/Library/CoreServices/SystemVersion.plist"]; |
| 27 versionNumber = [sv objectForKey:@"ProductVersion"]; |
| 28 |
| 29 return versionNumber; |
| 30 } |
| 31 |
| 32 @end |
OLD | NEW |