NSLog () does not output after callback

I have an NSLog call in a method that I know is being called (I set a breakpoint). But in this method is not displayed, or even after this method. When the application starts, my NSLog instructions work fine. I am wondering if this is some kind of threading issue.

NSLog stops at the taskDidTerminate method, which is a callback from NSTask:

[[NSNotificationCenter defaultCenter] addObserver:self
                          selector:@selector(taskDidTerminate:)
                          name:NSTaskDidTerminateNotification
                          object:localTask];

Any ideas?

Edit: taskDidTerminate

- (void) taskDidTerminate: (NSNotification *) notification 
{
    NSLog(@"TaskDid Terminate");
    [task.delegate taskCompleted:task];
}
+5
source share
2 answers

, XCode XCode, /bin/ bash -c (task) (). , NSLog() .

. .

+2

[task setStandardInput:[NSPipe pipe]]; , CocoaDev: NSTask.

+2

All Articles