Maven Learning-Plug-in Maven-Assembly-Plugin

2023-01-23   ES  

// Get the system version

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];
// Get Mac notebook model: Model Identifier
// Official model list:
// Command line View: System_profiler Sphardwaredatatype
size_t len = 0;
sysctlbyname("hw.model", NULL, &len, NULL, 0);
if (len) {
  char *model = (char*)malloc(len*sizeof(char));
  sysctlbyname("hw.model", model, &len, NULL, 0);
  printf("%s\n", model);// My machine output: macBookpro16,1


Related Posts

Windows environment Install mingw-w64/gccmr

15 useful JavaScript and CSS libraries

Android-NDK development foundation-Android JNI instance code (1)-execute Java method in JNI-C/C ++ call Java

Front -end VSCode commonly used plug -in

Maven Learning-Plug-in Maven-Assembly-Plugin

Random Posts

anti -order number

Various games puppet

Connection-to build the Connecton connection with the Tomcat connection pool The

Non -initial warning warning

SKYLINE Implementing the effect of rubber band effects drawing rectangular box