I'm making a console-based application in Objective-C which relies on being able to clear the console periodically. How can this be done? All I've seen on SO and Google were ways to have the developer clear the console with X-Code, but that will not do.
One solution I found on Yahoo! Answers told me to do the following, but it does not run due to being unable to find a file:
task = [[NSTask alloc]init];
[task setLaunchPath: @"/bin/bash"];
arguments = [NSArray arrayWithObjects: @"clear", nil];
[task setArguments: arguments];