Try using:
system( "clear" );
Important headings:
#include <stdlib.h>
Hint: Objective-C is still C, right?
UPDATE:
In case the environment variable "TERM is not set." :
1) Run the program directly from your terminal (or just ignore the error when testing it in Xcode, it should work in a regular terminal, right?)
2) Set the TERM variable in the schema settings. To what? Just run this in your terminal to find out what should be "TERM":
DrKameleons-MacBook-Pro:Documents drkameleon$ echo $TERM xterm-256color

Dr. Kameleon
source share