I need help. How come this does not work:
NSProcessInfo *process = [NSProcessInfo processInfo];
NSString *processName = [process processName];
int processId = [process processIdentifier];
NSString *processString = [NSString stringWithFormat:@"Process Name: @% Process ID: %f", processName, processId];
NSLog(processString);
But this does:
NSLog(@"Process Name: %@ Process ID: %d", [[NSProcessInfo processInfo] processName], [[NSProcessInfo processInfo] processIdentifier]);