Bonjour cannot run in a thread

11 Sep 2012

I've been fighting with Bonjour for a day now. Finally, I've figured it out somehow that Bonjour cannot be run in a thread, that ends.

If you do that, you have to tell Bonjour to run itself in the main loop with this command:

[self.bonjour scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];