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 #include <mach-o/arch.h> |
| 6 |
| 7 #import "SystemInfo.h" |
| 8 |
| 9 @implementation SystemInfo |
| 10 |
| 11 + (NSString*)getArch { |
| 12 const NXArchInfo* arch = NXGetLocalArchInfo(); |
| 13 NSString* archName = [NSString stringWithUTF8String:arch->name]; |
| 14 return archName; |
| 15 } |
| 16 |
| 17 + (NSString*)getOSVersion { |
| 18 NSDictionary* systemVersion = |
| 19 [NSDictionary dictionaryWithContentsOfFile: |
| 20 @"/System/Library/CoreServices/SystemVersion.plist"]; |
| 21 NSString* versionNumber = [systemVersion objectForKey:@"ProductVersion"]; |
| 22 |
| 23 return versionNumber; |
| 24 } |
| 25 |
| 26 @end |
OLD | NEW |