In two operations that you do different, an existing row is added, and the other you set a new row
To add a string, there must be a string object
 self.consoleText = [self.consoleText stringByAppendingString:[NSString stringWithUTF8String:str]]; 
According to the understanding of self.consoleText ---> nil, so it will not add a line.
do something like
 if(self.consoleText) { self.consoleText = [self.consoleText stringByAppendingString:[NSString stringWithUTF8String:str]]; }else { self.consoleText = [NSString stringWithUTF8String:str]; } 
 source share